-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Creado comando prf para enviar mensaje de verificación
- Loading branch information
1 parent
5e957d6
commit 8b40fe4
Showing
1 changed file
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} |