From f21608cf86383e1d22ae47d206c85e20c18f0c34 Mon Sep 17 00:00:00 2001 From: Taken Date: Thu, 30 Nov 2023 17:38:37 +0100 Subject: [PATCH 1/5] Added null safety --- src/commands/help.js | 3 +-- src/commands/reqs.js | 7 ++++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/commands/help.js b/src/commands/help.js index 98ef090..2c5545d 100644 --- a/src/commands/help.js +++ b/src/commands/help.js @@ -18,7 +18,6 @@ module.exports = { await interaction.deferReply({ ephemeral: true }) const embedColor = Number(color.replace("#", "0x")) - const footerText = interaction.guild ? interaction.guild.name : interaction.user.username + " | " + devMessage const footerIcon = interaction.guild ? interaction.guild.iconURL({ dynamic: true }) : interaction.user.avatarURL({ dynamic: true }) @@ -46,7 +45,7 @@ module.exports = { ], color: embedColor, thumbnail: { - url: interaction?.guild.iconURL({ dynamic: true }) || null + url: interaction?.guild?.iconURL({ dynamic: true }) || null }, footer: { icon_url: footerIcon, diff --git a/src/commands/reqs.js b/src/commands/reqs.js index 4bd4ae9..7e88719 100644 --- a/src/commands/reqs.js +++ b/src/commands/reqs.js @@ -1,6 +1,6 @@ const { SlashCommandBuilder } = require("discord.js") const { color, devMessage } = require("../../config/options.json") -const { bwfkdr, bwstars, bwwins, swstars, duelswins, duelswlr } = require("../../config/reqs.json") +const { bwfkdr, bwstars, bwwins, swstars, swkdr, duelswins, duelswlr } = require("../../config/reqs.json") module.exports = { name: "reqs", @@ -26,7 +26,7 @@ module.exports = { description: "**You must make 100k-150k weekly GEXP.\nAs well as onne of the game stats below**", color: embedColor, thumbnail: { - url: interaction.guild.iconURL() + url: interaction?.guild?.iconURL({ dynamic: true }) || null }, fields: [ { @@ -37,7 +37,8 @@ module.exports = { }, { name: "**Skywars**", - value: "**Stars:** `" + swstars.toString() + "`" + value: "**Stars:** `" + swstars.toString() + + "`\n**KDR:** `" + swkdr.toString() + "`" }, { name: "**Duels**", From f55a69434a5559a4dba0aadc1c9b1ab94d735d5b Mon Sep 17 00:00:00 2001 From: Taken Date: Thu, 30 Nov 2023 18:07:33 +0100 Subject: [PATCH 2/5] Added init function to prevent missing env vars --- src/index.js | 2 ++ src/utils/init.js | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 src/utils/init.js diff --git a/src/index.js b/src/index.js index b29f3a9..b1d4e20 100644 --- a/src/index.js +++ b/src/index.js @@ -1,6 +1,7 @@ const { Client, GatewayIntentBits, Partials, Collection } = require("discord.js") const { loadSlashCommandsEvents, loadContextMenuEvents, loadModalEvents, loadButtonEvents, loadEvents, loadAutocompleteEvents } = require("./utils/eventHandler.js") const { autoDeployCommands } = require("./utils/autodeploy.js") +const { init } = require("./utils/init.js") require("dotenv").config() const mongoURI = process.env.MONGOURI const { connect } = require("mongoose") @@ -26,6 +27,7 @@ client.commands = new Collection() client.events = new Collection() client.modals = new Collection() +init() loadSlashCommandsEvents(client) loadAutocompleteEvents(client) loadContextMenuEvents(client) diff --git a/src/utils/init.js b/src/utils/init.js new file mode 100644 index 0000000..85a7ff3 --- /dev/null +++ b/src/utils/init.js @@ -0,0 +1,38 @@ +const envars = [ + "TOKEN", + "MONGOURI", + "DEV", + "HYPIXELAPIKEY" +] +const devenvars = [ + "DEVTOKEN", + "CLIENTID", + "DEVID", + "GUILDID" +] + +function init() { + if (process.env.NODe_ENV !== "dev") { + for (const envar of envars) { + if (!process.env[envar]) { + console.error(`Missing ${envar} environment variable!`) + process.exit(1) + } + } + } else { + for (const envar of envars) { + if (!process.env[envar]) { + console.error(`Missing ${envar} environment variable!`) + process.exit(1) + } + } + for (const envar of devenvars) { + if (!process.env[envar]) { + console.error(`Missing ${envar} environment variable!`) + process.exit(1) + } + } + } +} + +module.exports = { init } From d3f814e1eae9789727b353be84a3e236d051b403 Mon Sep 17 00:00:00 2001 From: Taken Date: Thu, 30 Nov 2023 18:10:53 +0100 Subject: [PATCH 3/5] Added dev flag to all commands with value false --- src/commands/ban.js | 1 + src/commands/check.js | 1 + src/commands/clear.js | 1 + src/commands/devel.js | 1 + src/commands/forceunverify.js | 1 + src/commands/forceupdate.js | 1 + src/commands/forceverify.js | 1 + src/commands/guild.js | 1 + src/commands/help.js | 1 + src/commands/kick.js | 1 + src/commands/ping.js | 1 + src/commands/remove.js | 1 + src/commands/reqs.js | 2 ++ src/commands/send.js | 1 + src/commands/setnick.js | 1 + src/commands/slowmode.js | 1 + src/commands/timeout.js | 1 + src/commands/unban.js | 1 + src/commands/update.js | 1 + src/commands/uuid.js | 1 + src/commands/verify.js | 1 + src/commands/whois.js | 1 + 22 files changed, 23 insertions(+) diff --git a/src/commands/ban.js b/src/commands/ban.js index 2586dcf..1dc887b 100644 --- a/src/commands/ban.js +++ b/src/commands/ban.js @@ -6,6 +6,7 @@ module.exports = { name: "ban", description: "Ban a user", type: "slash", + dev: false, data: new SlashCommandBuilder() .setName("ban") diff --git a/src/commands/check.js b/src/commands/check.js index fdd2ea3..3eee962 100644 --- a/src/commands/check.js +++ b/src/commands/check.js @@ -7,6 +7,7 @@ module.exports = { name: "check", description: "Check a player's stats.", type: "slash", + dev: false, data: new SlashCommandBuilder() .setName("check") diff --git a/src/commands/clear.js b/src/commands/clear.js index 68b156b..93026e7 100644 --- a/src/commands/clear.js +++ b/src/commands/clear.js @@ -5,6 +5,7 @@ module.exports = { name: "clear", description: "Clears messages", type: "slash", + dev: false, data: new SlashCommandBuilder() .setName("clear") diff --git a/src/commands/devel.js b/src/commands/devel.js index d857163..b28cd03 100644 --- a/src/commands/devel.js +++ b/src/commands/devel.js @@ -4,6 +4,7 @@ module.exports = { name: "admin", description: "Admin command.", type: "slash", + dev: false, data: new SlashCommandBuilder() .setName("devel") diff --git a/src/commands/forceunverify.js b/src/commands/forceunverify.js index 0b3b76d..99e3884 100644 --- a/src/commands/forceunverify.js +++ b/src/commands/forceunverify.js @@ -8,6 +8,7 @@ module.exports = { name: "forceunverify", description: "Force unverify a user", type: "slash", + dev: false, data: new SlashCommandBuilder() .setName("forceunverify") diff --git a/src/commands/forceupdate.js b/src/commands/forceupdate.js index 8305833..eaa4168 100644 --- a/src/commands/forceupdate.js +++ b/src/commands/forceupdate.js @@ -9,6 +9,7 @@ module.exports = { name: "forceupdate", description: "Force update the user", type: "slash", + dev: false, data: new SlashCommandBuilder() .setName("forceupdate") diff --git a/src/commands/forceverify.js b/src/commands/forceverify.js index 090fff2..7b3542a 100644 --- a/src/commands/forceverify.js +++ b/src/commands/forceverify.js @@ -10,6 +10,7 @@ module.exports = { name: "forceverify", description: "Force verify a user.", type: "slash", + dev: false, data: new SlashCommandBuilder() .setName("forceverify") diff --git a/src/commands/guild.js b/src/commands/guild.js index ef1c146..fdd4b59 100644 --- a/src/commands/guild.js +++ b/src/commands/guild.js @@ -7,6 +7,7 @@ module.exports = { name: "guild", description: "Subcommands for guilds", type: "slash", + dev: false, data: new SlashCommandBuilder() .setName("guild") diff --git a/src/commands/help.js b/src/commands/help.js index 2c5545d..005b6da 100644 --- a/src/commands/help.js +++ b/src/commands/help.js @@ -5,6 +5,7 @@ module.exports = { name: "help", description: "Help command", type: "slash", + dev: false, data: new SlashCommandBuilder() .setName("help") diff --git a/src/commands/kick.js b/src/commands/kick.js index 7ad3840..9f69f2b 100644 --- a/src/commands/kick.js +++ b/src/commands/kick.js @@ -6,6 +6,7 @@ module.exports = { name: "kick", description: "Kick a member from the server.", type: "slash", + dev: false, data: new SlashCommandBuilder() .setName("kick") diff --git a/src/commands/ping.js b/src/commands/ping.js index 739e33c..30fb435 100644 --- a/src/commands/ping.js +++ b/src/commands/ping.js @@ -5,6 +5,7 @@ module.exports = { name: "ping", description: "Get the bot's ping.", type: "slash", + dev: false, data: new SlashCommandBuilder() .setName("ping") diff --git a/src/commands/remove.js b/src/commands/remove.js index e0dcafb..3d9efce 100644 --- a/src/commands/remove.js +++ b/src/commands/remove.js @@ -6,6 +6,7 @@ module.exports = { name: "remove", description: "Remove a person on the waiting list.", type: "slash", + dev: false, data: new SlashCommandBuilder() .setName("remove") diff --git a/src/commands/reqs.js b/src/commands/reqs.js index 7e88719..7f0da28 100644 --- a/src/commands/reqs.js +++ b/src/commands/reqs.js @@ -6,6 +6,8 @@ module.exports = { name: "reqs", description: "Displays the requirements for the guild.", type: "slash", + dev: false, + data: new SlashCommandBuilder() .setName("reqs") .setDescription("Displays the requirements for the guild."), diff --git a/src/commands/send.js b/src/commands/send.js index 0c571b2..cbbd506 100644 --- a/src/commands/send.js +++ b/src/commands/send.js @@ -5,6 +5,7 @@ module.exports = { name: "send", description: "Send a message to a channel.", type: "slash", + dev: false, data: new SlashCommandBuilder() .setName("send") diff --git a/src/commands/setnick.js b/src/commands/setnick.js index a727ce9..7d4d7d9 100644 --- a/src/commands/setnick.js +++ b/src/commands/setnick.js @@ -4,6 +4,7 @@ module.exports = { name: "setnick", description: "Set your nickname", type: "slash", + dev: false, data: new SlashCommandBuilder() .setName("setnick") diff --git a/src/commands/slowmode.js b/src/commands/slowmode.js index f0b6eb2..903f843 100644 --- a/src/commands/slowmode.js +++ b/src/commands/slowmode.js @@ -5,6 +5,7 @@ module.exports = { name: "slowmode", description: "Set the slowmode of a channel.", type: "slash", + dev: false, data: new SlashCommandBuilder() .setName("slowmode") diff --git a/src/commands/timeout.js b/src/commands/timeout.js index d7b4a31..3c7db29 100644 --- a/src/commands/timeout.js +++ b/src/commands/timeout.js @@ -6,6 +6,7 @@ module.exports = { name: "timeout", description: "Times out a memeber", type: "slash", + dev: false, data: new SlashCommandBuilder() .setName("timeout") diff --git a/src/commands/unban.js b/src/commands/unban.js index d4a4636..5859710 100644 --- a/src/commands/unban.js +++ b/src/commands/unban.js @@ -5,6 +5,7 @@ module.exports = { name: "unban", description: "Unban a user from the server", type: "slash", + dev: false, data: new SlashCommandBuilder() .setName("unban") diff --git a/src/commands/update.js b/src/commands/update.js index d444018..8fd4fcd 100644 --- a/src/commands/update.js +++ b/src/commands/update.js @@ -9,6 +9,7 @@ module.exports = { name: "update", description: "Update your guild rank.", type: "slash", + dev: false, data: new SlashCommandBuilder() .setName("update") diff --git a/src/commands/uuid.js b/src/commands/uuid.js index 9b157db..eadcaec 100644 --- a/src/commands/uuid.js +++ b/src/commands/uuid.js @@ -6,6 +6,7 @@ module.exports = { name: "uuid", description: "Get a player's UUID", type: "slash", + dev: false, data: new SlashCommandBuilder() .setName("uuid") diff --git a/src/commands/verify.js b/src/commands/verify.js index 1a80723..ab708c4 100644 --- a/src/commands/verify.js +++ b/src/commands/verify.js @@ -9,6 +9,7 @@ module.exports = { name: "verify", description: "Verify yourself as a member of the server.", type: "slash", + dev: false, data: new SlashCommandBuilder() .setName("verify") diff --git a/src/commands/whois.js b/src/commands/whois.js index db77911..df9f5e6 100644 --- a/src/commands/whois.js +++ b/src/commands/whois.js @@ -7,6 +7,7 @@ module.exports = { name: "whois", description: "Get's the ign of a user.", type: "slash", + dev: false, data: new SlashCommandBuilder() .setName("whois") From 1b38494b7502abf435b6f11f551e225e075689b7 Mon Sep 17 00:00:00 2001 From: Taken Date: Thu, 30 Nov 2023 18:15:13 +0100 Subject: [PATCH 4/5] Added public flag for use with the help command --- src/commands/ban.js | 1 + src/commands/check.js | 1 + src/commands/clear.js | 1 + src/commands/config.js | 1 + src/commands/devel.js | 1 + src/commands/forceunverify.js | 1 + src/commands/forceupdate.js | 1 + src/commands/forceverify.js | 1 + src/commands/guild.js | 1 + src/commands/help.js | 1 + src/commands/kick.js | 1 + src/commands/ping.js | 1 + src/commands/remove.js | 1 + src/commands/reqs.js | 1 + src/commands/send.js | 1 + src/commands/setnick.js | 1 + src/commands/setup.js | 1 + src/commands/slowmode.js | 1 + src/commands/timeout.js | 1 + src/commands/unban.js | 1 + src/commands/update.js | 1 + src/commands/uuid.js | 1 + src/commands/verify.js | 1 + src/commands/whois.js | 1 + 24 files changed, 24 insertions(+) diff --git a/src/commands/ban.js b/src/commands/ban.js index 1dc887b..f31794e 100644 --- a/src/commands/ban.js +++ b/src/commands/ban.js @@ -7,6 +7,7 @@ module.exports = { description: "Ban a user", type: "slash", dev: false, + public: false, data: new SlashCommandBuilder() .setName("ban") diff --git a/src/commands/check.js b/src/commands/check.js index 3eee962..6f16e03 100644 --- a/src/commands/check.js +++ b/src/commands/check.js @@ -8,6 +8,7 @@ module.exports = { description: "Check a player's stats.", type: "slash", dev: false, + public: true, data: new SlashCommandBuilder() .setName("check") diff --git a/src/commands/clear.js b/src/commands/clear.js index 93026e7..cfcd984 100644 --- a/src/commands/clear.js +++ b/src/commands/clear.js @@ -6,6 +6,7 @@ module.exports = { description: "Clears messages", type: "slash", dev: false, + public: false, data: new SlashCommandBuilder() .setName("clear") diff --git a/src/commands/config.js b/src/commands/config.js index 0cbdb43..584af23 100644 --- a/src/commands/config.js +++ b/src/commands/config.js @@ -8,6 +8,7 @@ module.exports = { description: "Configure the bot", type: "slash", dev: true, + public: false, data: new SlashCommandBuilder() .setName("config") diff --git a/src/commands/devel.js b/src/commands/devel.js index b28cd03..91763be 100644 --- a/src/commands/devel.js +++ b/src/commands/devel.js @@ -5,6 +5,7 @@ module.exports = { description: "Admin command.", type: "slash", dev: false, + public: false, data: new SlashCommandBuilder() .setName("devel") diff --git a/src/commands/forceunverify.js b/src/commands/forceunverify.js index 99e3884..896de0c 100644 --- a/src/commands/forceunverify.js +++ b/src/commands/forceunverify.js @@ -9,6 +9,7 @@ module.exports = { description: "Force unverify a user", type: "slash", dev: false, + public: false, data: new SlashCommandBuilder() .setName("forceunverify") diff --git a/src/commands/forceupdate.js b/src/commands/forceupdate.js index eaa4168..5f17c3f 100644 --- a/src/commands/forceupdate.js +++ b/src/commands/forceupdate.js @@ -10,6 +10,7 @@ module.exports = { description: "Force update the user", type: "slash", dev: false, + public: false, data: new SlashCommandBuilder() .setName("forceupdate") diff --git a/src/commands/forceverify.js b/src/commands/forceverify.js index 7b3542a..1510ba2 100644 --- a/src/commands/forceverify.js +++ b/src/commands/forceverify.js @@ -11,6 +11,7 @@ module.exports = { description: "Force verify a user.", type: "slash", dev: false, + public: false, data: new SlashCommandBuilder() .setName("forceverify") diff --git a/src/commands/guild.js b/src/commands/guild.js index fdd4b59..da5f5d7 100644 --- a/src/commands/guild.js +++ b/src/commands/guild.js @@ -8,6 +8,7 @@ module.exports = { description: "Subcommands for guilds", type: "slash", dev: false, + public: true, data: new SlashCommandBuilder() .setName("guild") diff --git a/src/commands/help.js b/src/commands/help.js index 005b6da..647c5f0 100644 --- a/src/commands/help.js +++ b/src/commands/help.js @@ -6,6 +6,7 @@ module.exports = { description: "Help command", type: "slash", dev: false, + public: true, data: new SlashCommandBuilder() .setName("help") diff --git a/src/commands/kick.js b/src/commands/kick.js index 9f69f2b..a7c61cf 100644 --- a/src/commands/kick.js +++ b/src/commands/kick.js @@ -7,6 +7,7 @@ module.exports = { description: "Kick a member from the server.", type: "slash", dev: false, + public: false, data: new SlashCommandBuilder() .setName("kick") diff --git a/src/commands/ping.js b/src/commands/ping.js index 30fb435..d88d5dc 100644 --- a/src/commands/ping.js +++ b/src/commands/ping.js @@ -6,6 +6,7 @@ module.exports = { description: "Get the bot's ping.", type: "slash", dev: false, + public: true, data: new SlashCommandBuilder() .setName("ping") diff --git a/src/commands/remove.js b/src/commands/remove.js index 3d9efce..c054f24 100644 --- a/src/commands/remove.js +++ b/src/commands/remove.js @@ -7,6 +7,7 @@ module.exports = { description: "Remove a person on the waiting list.", type: "slash", dev: false, + public: false, data: new SlashCommandBuilder() .setName("remove") diff --git a/src/commands/reqs.js b/src/commands/reqs.js index 7f0da28..74023f6 100644 --- a/src/commands/reqs.js +++ b/src/commands/reqs.js @@ -7,6 +7,7 @@ module.exports = { description: "Displays the requirements for the guild.", type: "slash", dev: false, + public: true, data: new SlashCommandBuilder() .setName("reqs") diff --git a/src/commands/send.js b/src/commands/send.js index cbbd506..cb02a0d 100644 --- a/src/commands/send.js +++ b/src/commands/send.js @@ -6,6 +6,7 @@ module.exports = { description: "Send a message to a channel.", type: "slash", dev: false, + public: false, data: new SlashCommandBuilder() .setName("send") diff --git a/src/commands/setnick.js b/src/commands/setnick.js index 7d4d7d9..02acf77 100644 --- a/src/commands/setnick.js +++ b/src/commands/setnick.js @@ -5,6 +5,7 @@ module.exports = { description: "Set your nickname", type: "slash", dev: false, + public: false, data: new SlashCommandBuilder() .setName("setnick") diff --git a/src/commands/setup.js b/src/commands/setup.js index a972823..492e44a 100644 --- a/src/commands/setup.js +++ b/src/commands/setup.js @@ -6,6 +6,7 @@ module.exports = { description: "Used for setup of the bot.", type: "slash", dev: true, + public: false, data: new SlashCommandBuilder() .setName("setup") diff --git a/src/commands/slowmode.js b/src/commands/slowmode.js index 903f843..6e4e69e 100644 --- a/src/commands/slowmode.js +++ b/src/commands/slowmode.js @@ -6,6 +6,7 @@ module.exports = { description: "Set the slowmode of a channel.", type: "slash", dev: false, + public: false, data: new SlashCommandBuilder() .setName("slowmode") diff --git a/src/commands/timeout.js b/src/commands/timeout.js index 3c7db29..e7e9633 100644 --- a/src/commands/timeout.js +++ b/src/commands/timeout.js @@ -7,6 +7,7 @@ module.exports = { description: "Times out a memeber", type: "slash", dev: false, + public: false, data: new SlashCommandBuilder() .setName("timeout") diff --git a/src/commands/unban.js b/src/commands/unban.js index 5859710..288e94e 100644 --- a/src/commands/unban.js +++ b/src/commands/unban.js @@ -6,6 +6,7 @@ module.exports = { description: "Unban a user from the server", type: "slash", dev: false, + public: false, data: new SlashCommandBuilder() .setName("unban") diff --git a/src/commands/update.js b/src/commands/update.js index 8fd4fcd..22b9f89 100644 --- a/src/commands/update.js +++ b/src/commands/update.js @@ -10,6 +10,7 @@ module.exports = { description: "Update your guild rank.", type: "slash", dev: false, + public: true, data: new SlashCommandBuilder() .setName("update") diff --git a/src/commands/uuid.js b/src/commands/uuid.js index eadcaec..6f64dd4 100644 --- a/src/commands/uuid.js +++ b/src/commands/uuid.js @@ -7,6 +7,7 @@ module.exports = { description: "Get a player's UUID", type: "slash", dev: false, + public: true, data: new SlashCommandBuilder() .setName("uuid") diff --git a/src/commands/verify.js b/src/commands/verify.js index ab708c4..e10fbca 100644 --- a/src/commands/verify.js +++ b/src/commands/verify.js @@ -10,6 +10,7 @@ module.exports = { description: "Verify yourself as a member of the server.", type: "slash", dev: false, + public: true, data: new SlashCommandBuilder() .setName("verify") diff --git a/src/commands/whois.js b/src/commands/whois.js index df9f5e6..0d6fe0d 100644 --- a/src/commands/whois.js +++ b/src/commands/whois.js @@ -8,6 +8,7 @@ module.exports = { description: "Get's the ign of a user.", type: "slash", dev: false, + public: false, data: new SlashCommandBuilder() .setName("whois") From ba33bd2296fb3565ed8f46e8f494dfefc5615ad1 Mon Sep 17 00:00:00 2001 From: Taken Date: Thu, 30 Nov 2023 18:24:47 +0100 Subject: [PATCH 5/5] Updated help command to work now --- src/commands/help.js | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/src/commands/help.js b/src/commands/help.js index 647c5f0..a20595a 100644 --- a/src/commands/help.js +++ b/src/commands/help.js @@ -1,11 +1,12 @@ const { SlashCommandBuilder } = require("discord.js") const { color, devMessage } = require("../../config/options.json") +const fs = require("fs") module.exports = { name: "help", description: "Help command", type: "slash", - dev: false, + dev: true, public: true, data: new SlashCommandBuilder() @@ -19,6 +20,21 @@ module.exports = { await interaction.deferReply({ ephemeral: true }) + const commands = [] + const commandFiles = fs.readdirSync(__dirname).filter(file => file.endsWith(".js")) + for (const file of commandFiles) { + const command = require(`./${file}`) + if (command.public) { + commands.push(command) + } + } + const commandList = commands.map((command) => { + return { + name: "**/" + command.name + "**", + value: "`" + command.description + "`" + } + }) + const embedColor = Number(color.replace("#", "0x")) const footerText = interaction.guild ? interaction.guild.name : interaction.user.username + " | " + devMessage const footerIcon = interaction.guild ? interaction.guild.iconURL({ dynamic: true }) : interaction.user.avatarURL({ dynamic: true }) @@ -27,24 +43,7 @@ module.exports = { embeds: [{ title: "Commands", description: "List of commands", - fields: [ - { - name: "/check", - value: "Check the stats of a player" - }, - { - name: "/reqs", - value: "Check the requirements of the guild" - }, - { - name: "/update", - value: "Update's your roles" - }, - { - name: "/help", - value: "Shows this message" - } - ], + fields: commandList, color: embedColor, thumbnail: { url: interaction?.guild?.iconURL({ dynamic: true }) || null