Skip to content

Commit

Permalink
Creado comando prf para enviar mensaje de verificación
Browse files Browse the repository at this point in the history
  • Loading branch information
imkuroneko committed Nov 21, 2022
1 parent 5e957d6 commit 8b40fe4
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions commands/prefix/embedverificacion.js
Original file line number Diff line number Diff line change
@@ -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);
}
}

0 comments on commit 8b40fe4

Please sign in to comment.