fix guild whitelist spam
This commit is contained in:
parent
047083d126
commit
c168c5bf99
1 changed files with 4 additions and 4 deletions
|
@ -140,15 +140,15 @@ export default class CommandParser {
|
|||
if (msg.author.bot) {
|
||||
return;
|
||||
}
|
||||
if (msg.channel.guild && !ctx.whitelist.guild(msg.channel.guild)) {
|
||||
msg.channel.createMessage('guild not whitelisted');
|
||||
return;
|
||||
}
|
||||
this.log.trace(msg.content);
|
||||
this.log.trace(msg.content.startsWith(this.prefix));
|
||||
this.log.trace(msg.content[0]);
|
||||
this.log.trace(this.prefix);
|
||||
if (msg.content.startsWith(this.prefix)) {
|
||||
if (msg.channel.guild && !ctx.whitelist.guild(msg.channel.guild)) {
|
||||
msg.channel.createMessage('guild not whitelisted');
|
||||
return;
|
||||
}
|
||||
const snip = msg.content.slice(this.prefix.length);
|
||||
const unsep = snip.split(' ');
|
||||
const res = this.hasCmd(unsep[0]);
|
||||
|
|
Loading…
Reference in a new issue