idhint & command id
Is sapphire framework supposed to assign command id to every command whether it is global or guild-only?
also, can we put idHints directly in the slash commands or not? if not, what do you suggest
Solution:Jump to solution
first question is a yes because that's just how the Discord API works (as well as databases in general for that matter). Every entity has an id. A message (like this), a user, a guild (server), channel, thread, forum post, etc, they all have ids.
For your second question, I'm not exactly sure what you're asking. There is only 1 valid place to put the
idHints
and that's as part of the registerChatInputCommand
/ registerContextMenuCommand
function's second paramater (options)
```ts
public override registerApplicationCommands(registry: Command.Registry) {...Sapphire Framework
Registering Chat Input Commands | Sapphire
To register a Chat Input Command (also known as a Slash Command) with Discord, you need to acquire an application
4 Replies
Solution
first question is a yes because that's just how the Discord API works (as well as databases in general for that matter). Every entity has an id. A message (like this), a user, a guild (server), channel, thread, forum post, etc, they all have ids.
For your second question, I'm not exactly sure what you're asking. There is only 1 valid place to put the
idHints
and that's as part of the registerChatInputCommand
/ registerContextMenuCommand
function's second paramater (options)
See also: https://sapphirejs.dev/docs/Guide/commands/application-commands/application-command-registry/registering-chat-input-commands/#idhintsSapphire Framework
Registering Chat Input Commands | Sapphire
To register a Chat Input Command (also known as a Slash Command) with Discord, you need to acquire an application
This is how I had it
I asked for a little help of my friend to guide me there which obviously was ai
at a glance that looks correct. What's the problem you're having, if any? Please show errors and such.
Yeah there is no error, I was just making sure it is all correct and how it is supposed to be because I kept having some trouble understanding certain things in the documentation
But if you claim it is correct then thank you very much