From 41a30478bc5ff046fcf2a6736b14d7fc5ca664d1 Mon Sep 17 00:00:00 2001 From: Tobiah Date: Thu, 1 Nov 2018 12:44:35 -0500 Subject: [PATCH] fix: settings default roles not displaying --- src/commands/Settings/Settings.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/commands/Settings/Settings.js b/src/commands/Settings/Settings.js index 4c0a17d9e..a8fc411a5 100644 --- a/src/commands/Settings/Settings.js +++ b/src/commands/Settings/Settings.js @@ -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);