CustomCommand don't work
C0LiSii0N opened this issue · 3 comments
Base informations
Minecraft version:
1.7.10
DiscordIntegration version:
3.0.1
Link to pastebin with (censored) config: Optional
Console error
[14:38:25] [JDA MainWS-ReadThread/INFO] [STDERR]: [chikachi.discord.repack.net.dv8tion.jda.core.utils.SimpleLog:print:396]: [14:38:25] [Fatal] [JDA]: One of the EventListeners had an uncaught exception [14:38:25] [JDA MainWS-ReadThread/INFO] [STDERR]: [chikachi.discord.repack.net.dv8tion.jda.core.utils.SimpleLog:print:396]: [14:38:25] [Fatal] [JDA]: Encountered an exception: [14:38:25] [JDA MainWS-ReadThread/INFO] [STDERR]: [chikachi.discord.repack.net.dv8tion.jda.core.utils.SimpleLog:print:396]: [14:38:25] [Fatal] [JDA]: java.lang.NullPointerException at net.minecraft.entity.player.EntityPlayerMP.func_145747_a(EntityPlayerMP.java:942) at net.minecraft.command.CommandHandler.func_71556_a(CommandHandler.java:128) at chikachi.discord.listener.DiscordListener.tryExecuteCommand(DiscordListener.java:220) at chikachi.discord.listener.DiscordListener.onMessageReceived(DiscordListener.java:104) at chikachi.discord.repack.net.dv8tion.jda.core.hooks.ListenerAdapter.onEvent(ListenerAdapter.java:385) at chikachi.discord.repack.net.dv8tion.jda.core.hooks.InterfacedEventManager.handle(InterfacedEventManager.java:84) at chikachi.discord.repack.net.dv8tion.jda.core.handle.MessageCreateHandler.handleDefaultMessage(MessageCreateHandler.java:128) at chikachi.discord.repack.net.dv8tion.jda.core.handle.MessageCreateHandler.handleInternally(MessageCreateHandler.java:49) at chikachi.discord.repack.net.dv8tion.jda.core.handle.SocketHandler.handle(SocketHandler.java:37) at chikachi.discord.repack.net.dv8tion.jda.core.requests.WebSocketClient.handleEvent(WebSocketClient.java:768) at chikachi.discord.repack.net.dv8tion.jda.core.requests.WebSocketClient.onTextMessage(WebSocketClient.java:498) at chikachi.discord.repack.com.neovisionaries.ws.client.ListenerManager.callOnTextMessage(ListenerManager.java:352) at chikachi.discord.repack.com.neovisionaries.ws.client.ReadingThread.callOnTextMessage(ReadingThread.java:260) at chikachi.discord.repack.com.neovisionaries.ws.client.ReadingThread.callOnTextMessage(ReadingThread.java:238) at chikachi.discord.repack.com.neovisionaries.ws.client.ReadingThread.handleTextFrame(ReadingThread.java:963) at chikachi.discord.repack.com.neovisionaries.ws.client.ReadingThread.handleFrame(ReadingThread.java:746) at chikachi.discord.repack.com.neovisionaries.ws.client.ReadingThread.main(ReadingThread.java:108) at chikachi.discord.repack.com.neovisionaries.ws.client.ReadingThread.runMain(ReadingThread.java:64) at chikachi.discord.repack.com.neovisionaries.ws.client.WebSocketThread.run(WebSocketThread.java:45)
Command config
"commands": [{
"name": "online",
"command": "/discord online",
"enabled": true,
"roles": ["Admin"]
}]
When I try to do a custom command on discord(like !online) the command is sent(Also if I dont have the right role it get the same error) but don't get executed, it just send a fatal error on the console :/
Sorry for my english if it's not perfect :/
You need to have a permissions section similar to what I have below.
{
"name": "whitelist",
"command": "whitelist {ARGS}",
"enabled": true,
"aliases": [],
"permissions": [
"role:owner",
"role:302635636870086657",
"role:264932313828163595"
]
}
So your fix should look like this
"commands": [
{
"name": "online",
"command": "discord online",
"enabled": true,
"aliases": [],
"permissions": ["role:admin"]
}
I hope this helps!
Well, at least it detect when I have the right role, but it still give me the same error when I'm authorized :c