Files
revanced-bots/bots/discord/commands/trainMessage.js
2023-03-20 23:51:53 +03:00

23 lines
528 B
JavaScript

import {
ContextMenuCommandBuilder,
ApplicationCommandType
} from 'discord.js';
export default {
data: new ContextMenuCommandBuilder()
.setName('Train Message')
.setType(ApplicationCommandType.Message),
async execute(helper, config, interaction) {
if (
interaction.member.roles.highest.comparePositionTo(
interaction.member.guild.roles.cache.get(config.discord.trainRole)
) < 0
)
return interaction.reply({
content: 'You don\'t have the permission to do this.',
ephemeral: true
});
}
};