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 toolkit2mo 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
mallusrgreat2mo ago
guild IDs are how we uniquely identify guilds, any other way and there's a possibility that it isn't unique anymore
Avarrice
Avarrice2mo ago
i don't really understand that, that means it's impossible for me to obtain it ?
mallusrgreat
mallusrgreat2mo 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
Avarrice2mo ago
server ID
Kinect3000
Kinect30002mo ago
Where/how was the config made in the first place?
Avarrice
Avarrice2mo ago
i did the same as the discord.js guild
Avarrice
Avarrice2mo 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
Avarrice2mo ago
nvm i already found the solution. thanks everyone