Skip to content

How to access GuildId with global commands? #2447

Answered by arqunis
Halldor-Hrafn asked this question in Q&A
Discussion options

You must be logged in to vote

Long story short, how would I get the GuildId with a global command?

CommandData::guild_id represents which guild the command was registered to. It is not the guild where the interaction was used. You should inspect the interaction's data for that instead.

The same applies for the user's ID.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Halldor-Hrafn
Comment options

Answer selected by Halldor-Hrafn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants