Description
When using the .setup command, the bot does not give you an error message.
Console error:
[11:49:22 ERROR]: [org.javacord.core.util.event.EventDispatcherBase] Unhandled exception in a listener thread for MCDC Tutorial!
java.util.concurrent.CompletionException: org.javacord.api.exception.MissingPermissionsException: Received a 403 response from Discord with body {"message": "Missing Permissions", "code": 50013}!
at java.util.concurrent.CompletableFuture.reportJoin(CompletableFuture.java:412) ~[?:?]
at java.util.concurrent.CompletableFuture.join(CompletableFuture.java:2108) ~[?:?]
at com.github.mafelp.discord.RoleAdmin.createNewRole(RoleAdmin.java:70) ~[?:?]
at com.github.mafelp.discord.commands.SetupListener.onMessageCreate(SetupListener.java:141) ~[?:?]
at org.javacord.core.util.event.EventDispatcher.lambda$dispatchMessageCreateEvent$104(EventDispatcher.java:3705) ~[?:?]
at org.javacord.core.util.event.EventDispatcherBase.lambda$dispatchEvent$10(EventDispatcherBase.java:197) ~[?:?]
at org.javacord.core.util.event.EventDispatcherBase.lambda$checkRunningListenersAndStartIfPossible$17(EventDispatcherBase.java:265) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) [?:?]
at java.lang.Thread.run(Thread.java:832) [?:?]
Caused by: org.javacord.api.exception.MissingPermissionsException: Received a 403 response from Discord with body {"message": "Missing Permissions", "code": 50013}!
at org.javacord.core.util.rest.RestRequestHttpResponseCode.lambda$getDiscordException$2(RestRequestHttpResponseCode.java:224) ~[?:?]
at java.util.Optional.map(Optional.java:258) ~[?:?]
at org.javacord.core.util.rest.RestRequestHttpResponseCode.getDiscordException(RestRequestHttpResponseCode.java:224) ~[?:?]
at org.javacord.core.util.rest.RestRequest.lambda$executeBlocking$11(RestRequest.java:395) ~[?:?]
at java.util.Optional.flatMap(Optional.java:287) ~[?:?]
at org.javacord.core.util.rest.RestRequest.executeBlocking(RestRequest.java:394) ~[?:?]
at org.javacord.core.util.ratelimit.RatelimitManager.lambda$queueRequest$2(RatelimitManager.java:114) ~[?:?]
... 5 more
Caused by: java.lang.Exception: origin of RestRequest call
at org.javacord.core.util.rest.RestRequest.<init>(RestRequest.java:75) ~[?:?]
at org.javacord.core.entity.permission.RoleBuilderDelegateImpl.create(RoleBuilderDelegateImpl.java:109) ~[?:?]
at org.javacord.api.entity.permission.RoleBuilder.create(RoleBuilder.java:104) ~[?:?]
... 10 more
Expected behavior
Try sending the user a help embed, informing him about missing permissions. If this does not work, send a meaningful message to the console.
Steps to reproduce
- Follow the installation guide
- Don't grant the bot any permissions!
- Execute command
.setup "test" in the discord channel.
Environment
- Linux 5.11.14
- OpenJDK Runtime Environment (build 15.0.2+7)
- Minecraft version 1.16.5
Description
When using the
.setupcommand, the bot does not give you an error message.Console error:
Expected behavior
Try sending the user a help embed, informing him about missing permissions. If this does not work, send a meaningful message to the console.
Steps to reproduce
.setup "test"in the discord channel.Environment