From 8b40fe4e1ebb2c7b84aaf501601219f734d53e93 Mon Sep 17 00:00:00 2001 From: KuroNeko Date: Sun, 20 Nov 2022 23:34:17 -0300 Subject: [PATCH] =?UTF-8?q?Creado=20comando=20prf=20para=20enviar=20mensaj?= =?UTF-8?q?e=20de=20verificaci=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- commands/prefix/embedverificacion.js | 38 ++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 commands/prefix/embedverificacion.js diff --git a/commands/prefix/embedverificacion.js b/commands/prefix/embedverificacion.js new file mode 100644 index 0000000..6b2ce0e --- /dev/null +++ b/commands/prefix/embedverificacion.js @@ -0,0 +1,38 @@ +// Load required resources ================================================================================================= +const { ActionRowBuilder, ButtonBuilder, ButtonStyle } = require('discord.js'); +const path = require('path'); + +// Load configuration files ================================================================================================ +const { ownerId } = require(path.resolve('./config/bot.json')); +const { defaultRole } = require(path.resolve('./config/roles.json')); + +// Module script =========================================================================================================== +exports.run = (client, message, args) => { + try { + message.delete(); + + if(message.author.id != ownerId) { return; } + + message.channel.send({ + embeds: [ + { + color: 0x941835, + title: "**⚖ Reglas**", + description: "Encontrarás las reglas de nuestra comunidad en <#751891992178327573>, recuerda seguirlas porque __el incumplimiento de estas es pasible de sanción__" + }, + { + color: 0x941835, + title: "**🚔 Verificación**", + description: `Para obtener el rol de <@&${defaultRole}> y acceder a nuestro Discord, haz clic en el botón de abajo` + }, + ], + components: [ + new ActionRowBuilder().addComponents( + new ButtonBuilder().setCustomId(`securityCheck;${defaultRole}`).setLabel('Verificarme').setStyle(ButtonStyle.Primary).setEmoji('✔') + ) + ] + }); + } catch(error) { + console.error('cmdPrefix:embedVerificacion | ', error.message); + } +} \ No newline at end of file