Error with Event Handler

PhantomBot Version: PhantomBot Version: 3.1.2 (stable) (Revision: 992c8752)
OS Version: Windows 10 10.0 (amd64)
Java Version: Java Version: 11.0.4+10-LTS
Browser and Version (for Panel Support): Panel Version: 1.0.2
Stock PhantomBot: Yes

Let us know what help you need:
Sometimes a command at Discord, for example !addcom, !topclip, !moderation or even other features just get “lagged” and you have to type again to work. With moderation log to Discord, it’s a bigger problem, when a mod timeout or ban someone at Twitch the log should appear at discord chat #modlog, but if it crashes and lag it won’t appear and causes an error. We can’t re-ban or re-to someone just to appear at #modlog, so we loss an important log information.

If a feature is not working, please provide console output, output from chat, logs, some sort of additional information to help us troubleshoot and provide assistance as needed:
[ERROR] [init.js:325] Error with Event Handler [PubSubModerationTimeout] Script [./discord/core/moderation.js] Stacktrace [embedTimeout()@moderation.js:204 > moderation.js:263 > init.js:323 > init.js:1073] Exception [JavaException: java.lang.NullPointerException: value]

More errors from /logs/error: phantombot errors -

I believe this should be fixed in nightly, but I will double check that Exception to be sure

Nightly versions seems to be even worse, every 60 seconds gives that error flooding the console:

[05-15-2020 @ 22:37:33.836 GMT] [lambda$reconnect$7()] Discord connection closed with status 4014 Disallowed intent(s).
[05-15-2020 @ 22:37:34.030 GMT] [lambda$onDiscordReadyEvent$0()] Connection with Discord was lost.
[05-15-2020 @ 22:37:34.033 GMT] [lambda$onDiscordReadyEvent$0()] Reconnecting will be attempted in 60 seconds...

Full Log Error: log error -

Somehow, that error don’t prevent discord modules to work. Commands like !topclip, moderation logs, etc, works fine even with that error sayin “connection with discord was lost.”

You can get rid of this error.
Go to Discord Developer Portal
Select your bot and check “PRESENCE INTENT” and “SERVER MEMBERS INTENT”

1 Like

Ok, that fixed the “Discord connection closed with status 4014 Disallowed intent(s)”.
Thank you!
Sadly, seems that Nightly version doesn’t fix the Error with Event Handler, happened again:
[ERROR] [init.js:325] Error with Event Handler [discordChannelCommand] Script [./discord/commands/customCommands.js] Stacktrace [say()@misc.js:110 > customCommands.js:341 > init.js:323 > init.js:591] Exception [JavaException: java.lang.NullPointerException: value]

That Exception generally means you are attempting to send a non-existant value back to discord as your message