Closed VingGit closed 3 years ago
i commented out everything related to slashcommands, but discord still remembers those pieces of code even tho they don't exist there.
Excerpt from the Discord developer documentation:
Global commands are cached for 1 hour. That means that new global commands will fan out slowly across all guilds, and will be guaranteed to be updated in an hour.
I'll get back to you about the exception, I'm currently busy.
Alright, I had a quick look and it looks like you didn't register a command listener. Edit: I'm wrong, Discord notified your bot about a command that you didn't register (because you changed the values) so it wasn't able to process the command.
Try registering a guild specific command (because they update instantly I think) and let me know if you encounter any problems.
i got it to work, thanks to you. But now we got another one.
27.04 20:25:29 [Bot] java.lang.IllegalStateException: Invalid option name
27.04 20:25:29 [Bot] at de.cerus.jdasc.command.ApplicationCommandOption.validate(ApplicationCommandOption.java:61)
27.04 20:25:29 [Bot] at de.cerus.jdasc.command.ApplicationCommandOption.
is it because of the ä and ö letters?
nah, it wasn't the umlauts.
Spaces are not allowed
First i tried to make my own slashcommands, but after restarting the bot, none of the slashcommands had updated. It still remembered the old structure and values given into it in the description.
I then returned it back to normal, but this time i only changed the strings. Still no update on the behavior/appearance of the test commands.
i coudln't get the formatting to work so here's the pastebin to the code: https://pastebin.com/W2BEteMP
and i got the following error message(it probably won't help you much but here's my source code https://github.com/VingGit/UnicaBot/blob/master/src/main/java/Botti/Botti.java):
27.04 16:11:34 [Bot] [JDA MainWS-ReadThread] INFO net.dv8tion.jda.internal.requests.WebSocketClient - Connected to WebSocket 27.04 16:11:35 [Bot] [JDA MainWS-ReadThread] INFO net.dv8tion.jda.api.JDA - Finished Loading! 27.04 16:12:12 [Bot] [JDA MainWS-ReadThread] ERROR net.dv8tion.jda.api.JDA - One of the EventListeners had an uncaught exception 27.04 16:12:12 [Bot] java.lang.NullPointerException 27.04 16:12:12 [Bot] at de.cerus.jdasc.JDASlashCommands.handleInteraction(JDASlashCommands.java:411) 27.04 16:12:12 [Bot] at de.cerus.jdasc.listener.InteractionListener.onGenericEvent(InteractionListener.java:65) 27.04 16:12:12 [Bot] at net.dv8tion.jda.api.hooks.ListenerAdapter.onEvent(ListenerAdapter.java:392) 27.04 16:12:12 [Bot] at net.dv8tion.jda.api.hooks.InterfacedEventManager.handle(InterfacedEventManager.java:96) 27.04 16:12:12 [Bot] at de.cerus.jdasc.listener.InteractionListener.onRawGateway(InteractionListener.java:53) 27.04 16:12:12 [Bot] at jdk.internal.reflect.GeneratedMethodAccessor2.invoke(Unknown Source) 27.04 16:12:12 [Bot] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 27.04 16:12:12 [Bot] at java.base/java.lang.reflect.Method.invoke(Unknown Source) 27.04 16:12:12 [Bot] at net.dv8tion.jda.api.hooks.ListenerAdapter.onEvent(ListenerAdapter.java:410) 27.04 16:12:12 [Bot] at net.dv8tion.jda.api.hooks.InterfacedEventManager.handle(InterfacedEventManager.java:96) 27.04 16:12:12 [Bot] at net.dv8tion.jda.internal.hooks.EventManagerProxy.handleInternally(EventManagerProxy.java:88) 27.04 16:12:12 [Bot] at net.dv8tion.jda.internal.hooks.EventManagerProxy.handle(EventManagerProxy.java:70) 27.04 16:12:12 [Bot] at net.dv8tion.jda.internal.JDAImpl.handleEvent(JDAImpl.java:149) 27.04 16:12:12 [Bot] at net.dv8tion.jda.internal.requests.WebSocketClient.onDispatch(WebSocketClient.java:958) 27.04 16:12:12 [Bot] at net.dv8tion.jda.internal.requests.WebSocketClient.onEvent(WebSocketClient.java:839) 27.04 16:12:12 [Bot] at net.dv8tion.jda.internal.requests.WebSocketClient.handleEvent(WebSocketClient.java:817) 27.04 16:12:12 [Bot] at net.dv8tion.jda.internal.requests.WebSocketClient.onBinaryMessage(WebSocketClient.java:990) 27.04 16:12:12 [Bot] at com.neovisionaries.ws.client.ListenerManager.callOnBinaryMessage(ListenerManager.java:385) 27.04 16:12:12 [Bot] at com.neovisionaries.ws.client.ReadingThread.callOnBinaryMessage(ReadingThread.java:276) 27.04 16:12:12 [Bot] at com.neovisionaries.ws.client.ReadingThread.handleBinaryFrame(ReadingThread.java:996) 27.04 16:12:12 [Bot] at com.neovisionaries.ws.client.ReadingThread.handleFrame(ReadingThread.java:755) 27.04 16:12:12 [Bot] at com.neovisionaries.ws.client.ReadingThread.main(ReadingThread.java:108) 27.04 16:12:12 [Bot] at com.neovisionaries.ws.client.ReadingThread.runMain(ReadingThread.java:64) 27.04 16:12:12 [Bot] at com.neovisionaries.ws.client.WebSocketThread.run(WebSocketThread.java:45)