My Discord bot is problematic

2020-05-09T14:07:49.813808+00:00 app[worker.1]: at process._tickCallback (internal/process/next_tick.js:189:7)
2020-05-09T14:07:49.813854+00:00 app[worker.1]: (node:4) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
2020-05-09T14:07:49.813908+00:00 app[worker.1]: (node:4) [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.
my problem is here. https://hizliresim.com/GsANFY

sorry for my english :frowning:

Unhandled promise rejection. You need to use .then and .catch where promises are used.

Add this in your index file:

process.on("uncaughtException", error => console.error(error));

to which file directory should I add?

The main (or index) file.

I couldn’t solve my problem, I don’t know where to throw it :frowning:

These errors just doesn’t come around, they come around when poor logic decisions have been made over time in your code. It’s hard to debug. I suggest you read a little bit on the web about async/await and promises.