Skip to content

Commit

Permalink
nullcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
davipatury committed May 2, 2020
1 parent 192f943 commit 59c8db4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/listeners/AutoModerator.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module.exports = class AutoModerator extends EventListener {
})
}

const autoRoleActive = await this.modules.autoRole.isActive(guild.id)
const autoRoleActive = this.modules && await this.modules.autoRole.isActive(guild.id)
if (autoRoleActive) {
if (member.user.bot) {
const botRoles = (await this.modules.autoRole.retrieveValue(guild.id, 'botRoles')).filter(r => !member.roles.has(r))
Expand Down

0 comments on commit 59c8db4

Please sign in to comment.