Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (!rolefound) {
- //adding
- if (userRoleCount == userRoles.size()) {
- ArrayList<String> roleNames2 = new ArrayList<>();
- for (IRole r : userRoles) {
- roleNames2.add(r.getName());
- }
- return "> An Error Occurred while attempting to update your roles.\n" +
- "please send this to the Bot Developer.\n" +
- "```Old Roles." + Utility.listFormatter(roleNames1, true) + "\n" +
- "New Roles." + Utility.listFormatter(roleNames2, true) + "```";
- }
- userRoles.add(guild.getRoleByID(newRoleId));
- } else {
- //removing
- if (userRoleCount - 2 == userRoles.size()) {
- ArrayList<String> roleNames2 = new ArrayList<>();
- for (IRole r : userRoles) {
- roleNames2.add(r.getName());
- }
- return "> An Error Occurred while attempting to update your roles.\n" +
- "please send this to the Bot Developer.\n" +
- "```Old Roles." + Utility.listFormatter(roleNames1, true) + "\n" +
- "New Roles." + Utility.listFormatter(roleNames2, true) + "```";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment