Removed Guild

This commit is contained in:
Noah committed 2022-02-17 19:57:37 -06:00
1 parent 8b3f2bc61a
commit 473bacf13a
3 files changed
+3 -9

No files matched your search

-2
View File
@@ -18,8 +18,6 @@ SupportBot_Version: "7.4.2"
Name: "SupportBot"
Token: "BOT_TOKEN"
# Guild ID Ex: 123456789123456789
Guild: ""
# -------------------------
# Activity Configuration
+2 -6
View File
@@ -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);
+1 -1
View File
@@ -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}`