diff --git a/src/main/java/emily/command/administrative/RoleAdminCommand.java b/src/main/java/emily/command/administrative/RoleAdminCommand.java index bb64e226..7cc1d834 100644 --- a/src/main/java/emily/command/administrative/RoleAdminCommand.java +++ b/src/main/java/emily/command/administrative/RoleAdminCommand.java @@ -132,8 +132,9 @@ public String execute(DiscordBot bot, String[] args, MessageChannel channel, Use String roleName = Misc.joinStrings(args, 2); Role role = DisUtil.findRole(guild, roleName); if (role == null) { - List selfRoleList = CGuildRoleAssignable.getRolesFor(CGuild.getCachedId(guild.getIdLong())); - if (!selfRoleList.contains(roleName)) { + List selfRoleList = CGuildRoleAssignable.getRolesFor(CGuild.getCachedId(guild.getIdLong())); + List selfRoleNameList = selfRoleList.stream().map(a->a.roleName).collect(Collectors.toList()); + if (!selfRoleNameList.contains(roleName)) { return "role not found :frowning:"; } } @@ -230,4 +231,4 @@ private void _mutateRole(Role role, Member member, boolean adding) { this.success = false; } } -} \ No newline at end of file +}