Hermitter / BDO-Boss-Alerts

A Discord bot that sends notification messages when a boss in Black Desert Online spawns.
9 stars 16 forks source link

Unhandled promise rejections #4

Closed alohadude3 closed 6 years ago

alohadude3 commented 6 years ago

(node:32598) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): DiscordAPIError: Missing Permissions (node:32598) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

The above messages are logged in the console upon a boss spawn.

I am running this on a Linux instance on Google's Cloud Compute Engine.

Hermitter commented 6 years ago

It looks like your bot doesn't have permission to write in that server or text channel. Is it able to post a message in Discord?

alohadude3 commented 6 years ago

The message it sends upon first connecting sends correctly. Is there some other specific permission I need to enable it to send rich embeds? I tried looking around but did not find anything.

Hermitter commented 6 years ago

You should be good, but I can't reproduce the errors your getting. Did you change any of the code? If not, try updating Node and create another discord app.

alohadude3 commented 6 years ago

No code change. What Node version are you running the bot with? I'm using v8.9.4

Hermitter commented 6 years ago

I've gotten it to work on v8.6.0 and v9.5.0 The error just seems to be with your discord setup. Try testing a new bot on a fresh Discord server.

alohadude3 commented 6 years ago

Do you have a way of emulating boss spawns just to make testing a bit less tedious?

Hermitter commented 6 years ago

emitter.bossEvents.sendEvent("bossSpawn", bossData.kutum); Add this to line 69 of bdoBossAlert.js

alohadude3 commented 6 years ago

Ok it's resolved now, seems like just my channel permissions were a bit messed up with all the roles and category nesting.