feat(discord-bot): a way to train AI

This commit is contained in:
GramingFoxTeam
2022-11-17 15:58:42 +03:00
parent 72c99e5db9
commit 355a50803a
2 changed files with 23 additions and 1 deletions

View File

@@ -2,7 +2,8 @@
"discord": {
"token": "YOUR-BOT-TOKEN-HERE",
"id": "1038762591805247518",
"trainRole": "965267139902705744"
"trainRole": "965267139902705744",
"trainingRole": "952987191401926697"
},
"telegram": {

View File

@@ -0,0 +1,21 @@
import { SlashCommandBuilder } from 'discord.js';
export default {
data: new SlashCommandBuilder()
.setName('train')
.setDescription('Train the AI.'),
async execute(interaction) {
if (!interaction.member.roles.cache.get(global.config.discord.trainingRole))
return interaction.reply({
content: 'You don\'t have the permission to do this.',
ephemeral: true
});
interaction.client.helper.trainAI();
interaction.reply({
content: 'Sent the trainAI command to the server.',
ephemeral: true
});
}
};