blob: 23aaf871a0555f19d9ecd07373df87c619423f5e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
import { Events } from 'discord.js';
import { ChatBot } from '../plugins/chatbot.js';
import { Evaluation } from '../plugins/eval.js';
export default {
name: Events.MessageCreate,
async execute(msg) {
if (!msg.client.application?.owner) await msg.client.application?.fetch();
if (msg.author.bot) return;
if (!msg.guild) return;
const args = msg.content.slice(`${msg.client.user}`.length).trim();
if (msg.mentions.has(msg.client.user)) {
if (args === 'execute') {
await Evaluation(msg);
} else {
await ChatBot(msg, args);
}
}
}
};
|