API Placeholder in Route
I didn't found it in the docs. Is there any way to get a placeholder into a route like in express with /routename/:id so I can use it to get the resource with the respective id?
Solution
F
Favna•392d ago
exactly like that. That isn't Express syntax, that's the recommended REST syntax.
you get the params through
request.params.id
, replace id
with whatever you put in :id
Welcome to the Sapphire Discord server! The next-gen object-oriented Discord.js bot framework can be found here.
2.1KMembers
View on DiscordWant results from more Discord servers?
More PostsTypeError piace.aliases is not iterableGood afternoon, I mixed such a strange code as best I could. My task was to add a button to the messI'm getting this error when used my new precondtion.my fileAPIInteractionDataResolvedGuildMember does not have idWhile fetching for member using `interaction.options.getMember('member')` it gives two types - `GuilAPI Client with SSL?Hey guys,
currently I am trying to make the switch from an custom express API to the API plugin. IsContext Menu Command and Subcommand cannot be in same extended class?I have a slash command which is an extended `Subcommand` called `give-role` with two subcommands - `UserErrors not being caught by listener - bot is crashingmessageCommandError.mjs
```js
import { Events, Listener } from "@sapphire/framework";
import { send Subcommand isn't runningWhen the subcommand is run in Discord, it times out. I've added a log to the beginning of the methodHow to properly handle UserErrors?I'm using the official sapphire template and want to throw a UserError inside a context menu command