mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-09 01:04:16 +02:00
Fix
This commit is contained in:
@@ -8,7 +8,7 @@ module.exports = class AutoReplyCommand extends Command {
|
||||
}
|
||||
|
||||
run(msg, args, fromPattern) {
|
||||
if (this.client.botListGuilds.includes(msg.guild.id)) return null;
|
||||
if (msg.guild && this.client.botListGuilds.includes(msg.guild.id)) return null;
|
||||
return this.reply ? msg.reply(this.generateText(fromPattern)) : msg.say(this.generateText(fromPattern));
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ module.exports = class SubredditCommand extends Command {
|
||||
|
||||
async run(msg, { subreddit }, fromPattern) {
|
||||
if (fromPattern) {
|
||||
if (this.client.botListGuilds.includes(msg.guild.id)) return null;
|
||||
if (msg.guild && this.client.botListGuilds.includes(msg.guild.id)) return null;
|
||||
subreddit = msg.patternMatches[1];
|
||||
}
|
||||
if (!subreddit) subreddit = typeof this.subreddit === 'function' ? this.subreddit() : this.subreddit;
|
||||
|
||||
Reference in New Issue
Block a user