diff --git a/bots/discord/commands/trainMessage.js b/bots/discord/commands/trainMessage.js index 1722517..a4960d5 100644 --- a/bots/discord/commands/trainMessage.js +++ b/bots/discord/commands/trainMessage.js @@ -2,6 +2,7 @@ import { ContextMenuCommandBuilder, ApplicationCommandType } from 'discord.js'; +import trainAISelectMenu from '../utils/trainAISelectMenu.js'; export default { data: new ContextMenuCommandBuilder() @@ -12,11 +13,11 @@ export default { interaction.member.roles.highest.comparePositionTo( interaction.member.guild.roles.cache.get(config.discord.trainRole) ) < 0 - ) - return interaction.reply({ + ) return interaction.reply({ content: 'You don\'t have the permission to do this.', ephemeral: true }); - + + trainAISelectMenu(interaction, config, helper); } }; diff --git a/bots/discord/events/helper/aiResponse.js b/bots/discord/events/helper/aiResponse.js index c51ec1f..de55e0d 100644 --- a/bots/discord/events/helper/aiResponse.js +++ b/bots/discord/events/helper/aiResponse.js @@ -55,7 +55,7 @@ export default { const reply = await message.reply({ embeds: [embed], components: [feedbackRow] }); const filter = (i) => i.member.roles.highest.comparePositionTo( i.member.guild.roles.cache.get(config.discord.trainRole) - ) < 0 + ) > 0 const collector = reply.createMessageComponentCollector({ filter, time: 15_000 }); collector.on('collect', (i) => {