Fix bot-maintained slowmodes not being applied

This commit is contained in:
Miikka 2019-04-15 14:11:58 +03:00 committed by GitHub
parent 160c31baf7
commit 24e16078ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -288,7 +288,7 @@ export class SlowmodePlugin extends ZeppelinPlugin<ISlowmodePluginConfig> {
// Make sure this user is affected by the slowmode
const member = this.guild.members.get(msg.user_id);
const isAffected = this.hasPermission("affected", { channelId: channel.id, userId: msg.user_id, member });
const isAffected = this.hasPermission("is_affected", { channelId: channel.id, userId: msg.user_id, member });
if (!isAffected) return thisMsgLock.unlock();
// Check if this channel even *has* a bot-maintained slowmode