Skip to content

Commit

Permalink
fix: check both if there's a mod role and that there's an id
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiTenno authored Jul 23, 2018
1 parent 6384bc2 commit d25959f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/commands/Rooms/Create.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class Create extends Command {
}

const modRole = message.guild.roles.get(await this.settings.getGuildSetting(message.guild, 'modRole'));
const useModRole = modRole.id ? message.guild.roles.has(modRole.id) : false;
const useModRole = modRole && modRole.id ? message.guild.roles.has(modRole.id) : false;

if (ctx.tempCategory || (message.guild && message.guild.channels.has(ctx.tempCategory))) {
useText = false;
Expand Down

0 comments on commit d25959f

Please sign in to comment.