From 28164e449d2a54ebc69443a18317098c1ee06d08 Mon Sep 17 00:00:00 2001 From: Taken Date: Fri, 31 Mar 2023 10:35:54 +0200 Subject: [PATCH] Adding reqs command to the list of commands that can be used in the command line. --- commands/reqs.js | 50 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 commands/reqs.js diff --git a/commands/reqs.js b/commands/reqs.js new file mode 100644 index 0000000..a0deece --- /dev/null +++ b/commands/reqs.js @@ -0,0 +1,50 @@ +const { SlashCommandBuilder } = require('discord.js'); +const { color } = require('../config/options.json'); +const { bwfdkr, bwstars, bwwins, duelswins, swstars } = require('../config/reqs.json'); + +module.exports = { + name: 'reqs', + description: 'Displays the requirements for the guild.', + type: 'slash', + data: new SlashCommandBuilder() + .setName('reqs') + .setDescription('Displays the requirements for the guild.'), + + async execute(interaction) { + + await interaction.deferReply({ ephemeral: true }); + + const embedColor = Number(color.replace("#", "0x")); + + await interaction.editReply({ + embeds: [{ + title: 'Requirements', + description: '**You must make 100k-150k weekly GEXP.\nAs well as onne of the game stats below**', + color: embedColor, + thumbnail: { + url: interaction.guild.iconURL() + }, + fields: [ + { + name: '**Bedwars**', + value: '**Stars:** `' + bwstars.toString() + + '`\n**Wins:** `' + bwwins.toString() + + '`\n**FKDR:** `' + bwfdkr.toString() + '`' + }, + { + name: '**Skywars**', + value: '**Stars:** `' + swstars.toString() + '`' + }, + { + name: '**Duels**', + value: '**Wins:** `' + duelswins.toString() + '`' + } + ], + footer: { + text: interaction.guild.name + ' | Developed by: @Taken#0002', + icon_url: interaction.guild.iconURL() + } + }] + }) + } +} \ No newline at end of file