jack3898 / discord-youtube-bot-2

A powerful Discord YouTube Bot.
0 stars 0 forks source link

"DiscordAPIError: Invalid Webhook Token" after 15 min #14

Open DheathNone opened 2 years ago

DheathNone commented 2 years ago

This seems to still fail:

/play query: 15 min song
/play query: tutturuu

even after provided fix at #10

bot      | 2022-04-13T20:43:01.987378006Z /home/node/node_modules/discord.js/src/rest/RequestHandler.js:350
bot      | 2022-04-13T20:43:01.987940923Z       throw new DiscordAPIError(data, res.status, request);
bot      | 2022-04-13T20:43:01.988171861Z             ^
bot      | 2022-04-13T20:43:02.014768636Z DiscordAPIError: Invalid Webhook Token
bot      | 2022-04-13T20:43:02.014949730Z     at RequestHandler.execute (/homenode/node_modules/discord.js/src/rest/RequestHandler.js:350:13)
bot      | 2022-04-13T20:43:02.015012230Z     at runMicrotasks (<anonymous>)
bot      | 2022-04-13T20:43:02.015048324Z     at processTicksAndRejections (node:internal/process/task_queues:96:5)
bot      | 2022-04-13T20:43:02.015082542Z     at async RequestHandler.push (/home/node/node_modules/discord.js/src/rest/RequestHandler.js:51:14)
bot      | 2022-04-13T20:43:02.015116136Z     at async InteractionWebhook.editMessage (/home/node/node_modules/discord.js/src/structures/Webhook.js:325:15)
bot      | 2022-04-13T20:43:02.015149469Z     at async CommandInteraction.editReply (/home/node/node_modules/discord.js/src/structures/interfaces/InteractionResponses.js:139:21)
bot      | 2022-04-13T20:43:02.015182438Z     at async MediaControls.refreshContent (/home/node/src/classes/modules/MediaControls.ts:147:3)
bot      | 2022-04-13T20:43:02.015215147Z     at async EventEmitter.<anonymous> (/home/node/src/commands/modules/Controls.ts:38:29) {
bot      | 2022-04-13T20:43:02.015247855Z   method: 'patch',
bot      | 2022-04-13T20:43:02.015281865Z   path: '/webhooks/[...]
bot      | 2022-04-13T20:43:02.015315824Z   code: 50027,
bot      | 2022-04-13T20:43:02.015346813Z   httpStatus: 401,
bot      | 2022-04-13T20:43:02.015378115Z   requestData: {
bot      | 2022-04-13T20:43:02.015409313Z     json: {
bot      | 2022-04-13T20:43:02.015440355Z       content: undefined,
bot      | 2022-04-13T20:43:02.015470980Z       tts: false,
bot      | 2022-04-13T20:43:02.015501813Z       nonce: undefined,
bot      | 2022-04-13T20:43:02.015533324Z       embeds: [Array],
bot      | 2022-04-13T20:43:02.015564522Z       components: undefined,
bot      | 2022-04-13T20:43:02.015595563Z       username: undefined,
bot      | 2022-04-13T20:43:02.015696084Z       avatar_url: undefined,
bot      | 2022-04-13T20:43:02.015730355Z       allowed_mentions: undefined,
bot      | 2022-04-13T20:43:02.015761970Z       flags: undefined,
bot      | 2022-04-13T20:43:02.015793220Z       message_reference: undefined,
bot      | 2022-04-13T20:43:02.015824157Z       attachments: undefined,
bot      | 2022-04-13T20:43:02.015855147Z       sticker_ids: undefined
bot      | 2022-04-13T20:43:02.015885824Z     },
bot      | 2022-04-13T20:43:02.015916136Z     files: []
bot      | 2022-04-13T20:43:02.015946813Z   }
bot      | 2022-04-13T20:43:02.015977178Z }
bot      | 2022-04-13T20:43:02.213660756Z npm notice
bot      | 2022-04-13T20:43:02.217283986Z npm notice New minor version of npm available! 8.3.1 -> 8.6.0
bot      | 2022-04-13T20:43:02.221140654Z npm notice Changelog: <https://github.com/npm/cli/releases/tag/v8.6.0>
bot      | 2022-04-13T20:43:02.223230498Z npm notice Run `npm install -g npm@8.6.0` to update!
bot      | 2022-04-13T20:43:02.226139769Z npm notice
jack3898 commented 2 years ago

Oh this is not good 🙁

Could you try something? On line 63 in src/classes/modules/CommandInteractionHelper.ts reduce the time from ~15 minutes to ~10 minutes. Let me know if you have the problem then. :)

Jack