mirror of
https://github.com/nx-bat/discordbot-ng.git
synced 2026-11-11 07:13:37 -05:00
[Events] Restrict bot to configured guild. (#26)
This commit is contained in:
@@ -126,6 +126,10 @@ client.on('interactionCreate', async (interaction) => {
|
||||
client.on('clientReady', async () => {
|
||||
console.log(`Logged in as ${client.user!.tag}!`);
|
||||
|
||||
for (const guild of client.guilds.cache.values()) {
|
||||
if (guild.id != config.DISCORD_GUILD_ID) await guild.leave();
|
||||
}
|
||||
|
||||
await loadHandlersFrom('commands', commands);
|
||||
await loadHandlersFrom('context-menus', contextMenus);
|
||||
await loadHandlersFrom('menus', menus);
|
||||
|
||||
Reference in New Issue
Block a user