From 229d26235b2897dcab4b24b75e1b054cfd094911 Mon Sep 17 00:00:00 2001 From: Taken Date: Sat, 15 Apr 2023 21:21:19 +0200 Subject: [PATCH] Adding the help command --- commands/help.js | 54 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 commands/help.js diff --git a/commands/help.js b/commands/help.js new file mode 100644 index 0000000..09dcdf6 --- /dev/null +++ b/commands/help.js @@ -0,0 +1,54 @@ +const { SlashCommandBuilder, ChannelType } = require('discord.js'); +const { color } = require('../config/options.json'); + +module.exports = { + name: 'help', + description: 'Help command', + type: 'slash', + + data: new SlashCommandBuilder() + .setName('help') + .setDescription('Help command') + .setDMPermission(true), + + async execute(interaction) { + + await interaction.deferReply({ ephemeral: true }); + + const embedColor = Number(color.replace('#', '0x')); + + await interaction.editReply({ + 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' + } + ], + color: embedColor, + thumbnail: { + url: interaction.guild.iconURL({ dynamic: true }) + }, + footer: { + icon_url: interaction.guild.iconURL({ dynamic: true }), + text: interaction.guild.name + ' | Developed by: @Taken#0001' + } + }] + }); + + } +}; \ No newline at end of file