From 473bacf13af513e6d9102222b2e2c00bd2f739f3 Mon Sep 17 00:00:00 2001 From: Noah Date: Thu, 17 Feb 2022 19:57:37 -0600 Subject: [PATCH] Removed Guild --- Configs/supportbot.yml | 2 -- Events/ready.js | 8 ++------ Structures/Client.js | 2 +- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/Configs/supportbot.yml b/Configs/supportbot.yml index 93ca137..ed3937c 100644 --- a/Configs/supportbot.yml +++ b/Configs/supportbot.yml @@ -18,8 +18,6 @@ SupportBot_Version: "7.4.2" Name: "SupportBot" Token: "BOT_TOKEN" -# Guild ID Ex: 123456789123456789 -Guild: "" # ------------------------- # Activity Configuration diff --git a/Events/ready.js b/Events/ready.js index 2777d2c..363fada 100644 --- a/Events/ready.js +++ b/Events/ready.js @@ -74,14 +74,10 @@ module.exports = new Event("ready", async (client) => { console.log(`\u001b[37m`, `SupportBot proudly created by Emerald Services`); console.log(` `); console.log(`\u001b[31m`, `――――――――――――――――――――――――――――――――――――――――――――`); - if ( - !supportbot.Guild || - client.guilds.cache.size !== 1 || - (await client.guilds.cache.first().id) !== supportbot.Guild - ) { + if (client.guilds.cache.size !== 1) { console.log( `\u001b[31m`, - `${client.user.username} is not in the correct server set in your config. Please join the server and restart the bot.` + `${client.user.username} must be in only 1 server. Please join this server, leave any others, and restart the bot.` ); console.log(`\u001b[31m`, `${client.user.username} will now exit.`); return process.exit(1); diff --git a/Structures/Client.js b/Structures/Client.js index 08520d3..5223546 100644 --- a/Structures/Client.js +++ b/Structures/Client.js @@ -89,7 +89,7 @@ class Client extends Discord.Client { // Slash Commands this.once("ready", async () => { - await this.application?.commands.set(this.commands, supportbot.Guild); + await this.guilds.cache.first()?.commands.set(this.commands); console.log( `\u001b[32;1m`, `Slash Commands Registered for ${this.guilds.cache.first().name}`