orewaee / discord-auth

Discord auth for Velocity proxy server
https://discord-auth-wiki.vercel.app/
MIT License
3 stars 0 forks source link

Can't set up the plugin #4

Open The-Reminiscence opened 4 months ago

The-Reminiscence commented 4 months ago

I have tried to test to add this plugin to my server and I have added it to a bot, I think I have given all the relevant permissions to the bot and I have filled in everything it asked for in the config, but I ended up getting this error when trying to execute a command in discord.

[21:50:05 ERROR] [net.dv8tion.jda.api.JDA]: One of the EventListeners had an uncaught exception
java.lang.NullPointerException: Cannot invoke "java.util.Set.size()" because "accounts" is null
        at dev.orewaee.bot.AccountsCommand.onSlashCommandInteraction(AccountsCommand.java:30) ~[?:?]
        at net.dv8tion.jda.api.hooks.ListenerAdapter.onEvent(ListenerAdapter.java:442) ~[?:?]
        at net.dv8tion.jda.api.hooks.InterfacedEventManager.handle(InterfacedEventManager.java:96) ~[?:?]
        at net.dv8tion.jda.internal.hooks.EventManagerProxy.handleInternally(EventManagerProxy.java:88) ~[?:?]
        at net.dv8tion.jda.internal.hooks.EventManagerProxy.handle(EventManagerProxy.java:70) ~[?:?]
        at net.dv8tion.jda.internal.JDAImpl.handleEvent(JDAImpl.java:176) ~[?:?]
        at net.dv8tion.jda.internal.handle.InteractionCreateHandler.handleCommand(InteractionCreateHandler.java:126) ~[?:?]
        at net.dv8tion.jda.internal.handle.InteractionCreateHandler.handleInternally(InteractionCreateHandler.java:97) ~[?:?]
        at net.dv8tion.jda.internal.handle.SocketHandler.handle(SocketHandler.java:39) ~[?:?]
        at net.dv8tion.jda.internal.requests.WebSocketClient.onDispatch(WebSocketClient.java:1014) ~[?:?]
        at net.dv8tion.jda.internal.requests.WebSocketClient.onEvent(WebSocketClient.java:900) ~[?:?]
        at net.dv8tion.jda.internal.requests.WebSocketClient.handleEvent(WebSocketClient.java:878) ~[?:?]
        at net.dv8tion.jda.internal.requests.WebSocketClient.onBinaryMessage(WebSocketClient.java:1053) ~[?:?]
        at com.neovisionaries.ws.client.ListenerManager.callOnBinaryMessage(ListenerManager.java:385) ~[?:?]
        at com.neovisionaries.ws.client.ReadingThread.callOnBinaryMessage(ReadingThread.java:276) ~[?:?]
        at com.neovisionaries.ws.client.ReadingThread.handleBinaryFrame(ReadingThread.java:996) ~[?:?]
        at com.neovisionaries.ws.client.ReadingThread.handleFrame(ReadingThread.java:755) ~[?:?]
        at com.neovisionaries.ws.client.ReadingThread.main(ReadingThread.java:108) ~[?:?]
        at com.neovisionaries.ws.client.ReadingThread.runMain(ReadingThread.java:64) ~[?:?]
        at com.neovisionaries.ws.client.WebSocketThread.run(WebSocketThread.java:45) ~[?:?]
orewaee commented 4 months ago

Try writing empty square brackets ([]) in the plugins/DiscordAuth/accounts.json file. After that, restart the plugin. If the problem persists, please report.

The-Reminiscence commented 4 months ago

Now I don't see any error on the server log but the discord bot is not responding.... Maybe it's my fault? Idk image

orewaee commented 4 months ago

Most likely you did not specify your Discord ID in the configuration file (plugins/DiscordAuth/config.toml). This field should look like this:

admin_discord_id = "xxx;yyy"

Using ; you can specify the IDs of trusted users.

The-Reminiscence commented 4 months ago

Nothing... I share w/you an image of the Config Discord Auth files: image

And bot privileges: image In the server the bot was added with Administrator permissions.

orewaee commented 4 months ago

So far I can’t give a good answer to your problem. I will try to identify the reasons for this behavior of the plugin in the coming days. If there are any changes, please let me know.