automatically obtain guildId

how do i obtain guildId automatically ? i'm tired of setting the guildId manually in config
10 Replies
d.js toolkit
d.js toolkit8mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - Marked as resolved by OP
mallusrgreat
mallusrgreat8mo ago
guild IDs are how we uniquely identify guilds, any other way and there's a possibility that it isn't unique anymore
Avarrice
AvarriceOP8mo ago
i don't really understand that, that means it's impossible for me to obtain it ?
mallusrgreat
mallusrgreat8mo ago
any identifiers other than the ID of the guild is not unique, if you try to do something with something that is not the guild's id, there's a possibility that it might end up in another guild
Avarrice
AvarriceOP8mo ago
server ID
Kinect3000
Kinect30008mo ago
Where/how was the config made in the first place?
Avarrice
AvarriceOP8mo ago
i did the same as the discord.js guild
Avarrice
AvarriceOP8mo ago
i mean this one
No description
𝒄𝒐𝒄𝒐𝒌𝒊𝒕𝒕𝒆𝒏
They're talking about their config, so I assume they mean they don't want to manually add the guild IDs of the guilds their bot is in so that they can store guild specific settings. But you can get the guild id from every interaction, so if you have a setup command or something, u get it from there. Alternatively there's a guild join event too. If I didn't totally misunderstand the question lol
Avarrice
AvarriceOP8mo ago
nvm i already found the solution. thanks everyone
Want results from more Discord servers?
Add your server