mirror of
https://github.com/ReVanced/revanced-bots.git
synced 2026-01-22 10:43:57 +00:00
24 lines
638 B
JavaScript
24 lines
638 B
JavaScript
import {
|
|
ContextMenuCommandBuilder,
|
|
ApplicationCommandType
|
|
} from 'discord.js';
|
|
import trainAISelectMenu from '../utils/trainAISelectMenu.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
|
|
});
|
|
|
|
trainAISelectMenu(interaction, config, helper);
|
|
}
|
|
};
|