diff options
Diffstat (limited to 'src/main/java/net/tylermurphy/ken/command/selfrole/Roles.java')
-rw-r--r-- | src/main/java/net/tylermurphy/ken/command/selfrole/Roles.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main/java/net/tylermurphy/ken/command/selfrole/Roles.java b/src/main/java/net/tylermurphy/ken/command/selfrole/Roles.java index c294d82..3634642 100644 --- a/src/main/java/net/tylermurphy/ken/command/selfrole/Roles.java +++ b/src/main/java/net/tylermurphy/ken/command/selfrole/Roles.java @@ -53,6 +53,9 @@ public class Roles { @SelectMenuCallback(name="roles") public Response onSelect(String choice, Member sender, Guild guild){ long id = Long.parseLong(choice); + if(id == 0L) { + return Response.error("There are no role selections on this page"); + } Role role = Ken.getInstance().getRoleById(id); try { if (sender.getRoles().contains(role)) { @@ -93,6 +96,10 @@ public class Roles { result.add(role.getName()); result.add(role.getId()); } + if(result.isEmpty()){ + result.add("No Roles Listed"); + result.add(String.valueOf(0L)); + } return result; } |