mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-17 21:40:51 +02:00
Add ability to disable auto-reply commands in bot lists
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
const Command = require('../Command');
|
||||
|
||||
module.exports = class AutoReplyCommand extends Command {
|
||||
constructor(client, info) {
|
||||
super(client, info);
|
||||
|
||||
this.reply = info.reply || false;
|
||||
}
|
||||
|
||||
run(msg, args, fromPattern) {
|
||||
if (this.client.botListGuilds.includes(msg.guild.id)) return null;
|
||||
return this.reply ? msg.reply(this.generateText(fromPattern)) : msg.say(this.generateText(fromPattern));
|
||||
}
|
||||
|
||||
generateText() {
|
||||
throw new Error('The generateText method is required.');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user