Removed Guild
This commit is contained in:
1 parent
8b3f2bc61a
commit
473bacf13a
3 files changed
+3
-9
No files matched your search
@@ -18,8 +18,6 @@ SupportBot_Version: "7.4.2"
|
|||||||
|
|
||||||
Name: "SupportBot"
|
Name: "SupportBot"
|
||||||
Token: "BOT_TOKEN"
|
Token: "BOT_TOKEN"
|
||||||
# Guild ID Ex: 123456789123456789
|
|
||||||
Guild: ""
|
|
||||||
|
|
||||||
# -------------------------
|
# -------------------------
|
||||||
# Activity Configuration
|
# Activity Configuration
|
||||||
|
|||||||
+2
-6
@@ -74,14 +74,10 @@ module.exports = new Event("ready", async (client) => {
|
|||||||
console.log(`\u001b[37m`, `SupportBot proudly created by Emerald Services`);
|
console.log(`\u001b[37m`, `SupportBot proudly created by Emerald Services`);
|
||||||
console.log(` `);
|
console.log(` `);
|
||||||
console.log(`\u001b[31m`, `――――――――――――――――――――――――――――――――――――――――――――`);
|
console.log(`\u001b[31m`, `――――――――――――――――――――――――――――――――――――――――――――`);
|
||||||
if (
|
if (client.guilds.cache.size !== 1) {
|
||||||
!supportbot.Guild ||
|
|
||||||
client.guilds.cache.size !== 1 ||
|
|
||||||
(await client.guilds.cache.first().id) !== supportbot.Guild
|
|
||||||
) {
|
|
||||||
console.log(
|
console.log(
|
||||||
`\u001b[31m`,
|
`\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.`);
|
console.log(`\u001b[31m`, `${client.user.username} will now exit.`);
|
||||||
return process.exit(1);
|
return process.exit(1);
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ class Client extends Discord.Client {
|
|||||||
// Slash Commands
|
// Slash Commands
|
||||||
|
|
||||||
this.once("ready", async () => {
|
this.once("ready", async () => {
|
||||||
await this.application?.commands.set(this.commands, supportbot.Guild);
|
await this.guilds.cache.first()?.commands.set(this.commands);
|
||||||
console.log(
|
console.log(
|
||||||
`\u001b[32;1m`,
|
`\u001b[32;1m`,
|
||||||
`Slash Commands Registered for ${this.guilds.cache.first().name}`
|
`Slash Commands Registered for ${this.guilds.cache.first().name}`
|
||||||
|
|||||||
Reference in new issue
Block a user