MalwareWerewolf / RaptorSA

RaptorSA a multi function Discord Js bot.
MIT License
52 stars 53 forks source link

[Issue] [Question?] [All the flairs] I don't even know what this issue is. #20

Closed Dragonizedpizza closed 3 years ago

Dragonizedpizza commented 3 years ago

What even is this


    at RequestHandler.execute (C:\Users\akyra\Desktop\Bots\RaptorSA\node_modules\discord.js\src\rest\RequestHandler.js:107:21)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:20220) 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(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:20220) [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.
MalwareWerewolf commented 3 years ago

Hi @Dragonizedpizza , please provide more details, what command did you use ? Is the google command ?

Without more details I can't solve this issue and it will be considered invalid.

Dragonizedpizza commented 3 years ago

@Cramenorn I was just doing booting the bot up, using node index.js.


(node:20220) UnhandledPromiseRejectionWarning: AbortError: The user aborted a request.
    at RequestHandler.execute (C:\Users\akyra\Desktop\Bots\RaptorSA\node_modules\discord.js\src\rest\RequestHandler.js:107:21)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:20220) 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(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:20220) [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.
Dragonizedpizza commented 3 years ago

it came after the yt search tho

MalwareWerewolf commented 3 years ago

That happens because an async operation is failing, the only way to prevent an error like UnhandledPromiseRejectionWarning is to catch that exception and print a custom message.

When you are starting the bot, you need to type node index.js a second time to prevent this error.

As you can see this exception is thrown by the Discord.js module _"C:\Users\akyra\Desktop\Bots\RaptorSA\node_modules\discord.js\src\rest\RequestHandler.js:107:21"_ , as I said the only way to prevent this exception is to catch it.