Skip to content

Commit

Permalink
fix: settings default roles not displaying
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiTenno committed Nov 1, 2018
1 parent 870b25d commit 41a3047
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/commands/Settings/Settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,11 @@ class Settings extends Command {
page.addField('Delete Message Post-Respond', await this.resolveBoolean(channel, 'delete_after_respond', settings), true);
page.addField('Delete Response Post-Respond', await this.resolveBoolean(channel, 'delete_response', settings), true);

const defaultRoles = JSON.parse(settings.defaultRoles || '[]').map(roleId => channel.guild.roles.get(roleId));
const defaultRoles = JSON.parse(settings.defaultRoles || '[]')
.map(roleId => channel.guild.roles.get(roleId) || undefined)
.filter(role => role)
.map(role => role.toString())
.join(', ');

if (message.guild) {
page.addField('Temp Channel Category', settings.tempCategory !== '0' ? settings.tempCategory : '✘', true);
Expand Down

0 comments on commit 41a3047

Please sign in to comment.