Skip to content

Commit

Permalink
fix: fix for saving complex instead of simple roles
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiTenno committed Aug 11, 2018
1 parent 04459d7 commit 56e4990
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion src/commands/Roles/AddRole.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class AddRole extends Command {
return this.messageManager.statuses.FAILURE;
}

const rolesToCommit = roles.map(innerRole => innerRole);
const rolesToCommit = roles.map(innerRole => innerRole.getSimple());
const newRole = new JoinableRole(role);

if (reqRoleRegex.test(message.strippedContent)) {
Expand Down
1 change: 0 additions & 1 deletion src/commands/Roles/RemoveRole.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ class RemoveRole extends Command {
return this.messageManager.statuses.FAILURE;
}
const roles = await this.settings.getRolesForGuild(message.guild);
this.logger.debug(`roles: ${JSON.stringify(roles.map(somerole => somerole.getSimple()))}`);
const filteredRoles = roles.filter(storedRole => role.id === storedRole.id);
if (filteredRoles.length > 0) {
const deleteRole = deleteRegex.test(message.strippedContent);
Expand Down

0 comments on commit 56e4990

Please sign in to comment.