dreeves / omnibot

Discord/Slack bot to play a dictionary guessing game and other things
1 stars 0 forks source link

Crash when submitting bid #199

Open dreeves opened 10 months ago

dreeves commented 10 months ago

I don't know how to replicate this yet but here's what I see in the Replit console:

DEBUG nonce: B2UHKNUCWrO19hYfRNWoiw== Hint: hit control+c anytime to enter REPL. Omnibot is running; listening for events from Slack / the web Logged in to Discord as omnibot#2781

node:events:491 throw er; // Unhandled 'error' event ^

DiscordAPIError[50027]: Invalid Webhook Token at handleErrors (/home/runner/omnibot/node_modules/@discordjs/rest/dist/index.js:640:13) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async SequentialHandler.runRequest (/home/runner/omnibot/node_modules/@discordjs/rest/dist/index.js:1021:23) at async SequentialHandler.queueRequest (/home/runner/omnibot/node_modules/@discordjs/rest/dist/index.js:862:14) at async REST.request (/home/runner/omnibot/node_modules/@discordjs/rest/dist/index.js:1387:22) at async InteractionWebhook.send (/home/runner/omnibot/nodemodules/discord.js/src/structures/Webhook.js:222:15) at async sendmesg (/home/runner/omnibot/platforms/discord/sendmesg.js:75:22) at async sendmesg (/home/runner/omnibot/sendemitter.js:30:12) at async module.exports (/home/runner/omnibot/commands/bid.js:283:5) Emitted 'error' event on Client instance at: at emitUnhandledRejectionOrErr (node:events:394:10) { requestBody: { files: [], json: { content: 'Got final bid from <@986055512128913478>! :tada: Results:\n' + '\t<@716400322297331712>: 6\n' + '\t<@986055512128913478>: 15\n' + '\t<@298617884664528896>: 16\n' + '\n' + '/roll 10 → 10 not 1 ∴ no payments!_ :sweat_smile:', tts: false, nonce: undefined, embeds: undefined, components: undefined, username: undefined, avatar_url: undefined, allowed_mentions: undefined, flags: undefined, message_reference: undefined, attachments: undefined, sticker_ids: undefined, thread_name: undefined } }, rawError: { message: 'Invalid Webhook Token', code: 50027 }, code: 50027, status: 401, method: 'POST', url: 'https://discord.com/api/v10/webhooks/911686934206771212/aW50ZXJhY3Rpb246MTE0ODQyMDc5NDY3NDg0Nzg4NTpQM3BTYWhkdTBtVUJhUUlIa21Wc0VFaTZ1RDQ4OXBWdmFreXh4Qkd5a2FGWU40SVdUNXFzNWZjQVY2ZUN4Sjlsd0NuaUVva3hXTktIQVVMc2Q0Sjc0Q0g5SG95VFE1VVRJWG9XdVF4anN5Sk1xZlZBVDFSUTNNZVF2cVM5dkVsbQ?wait=true' }

Node.js v18.12.1 repl process died unexpectedly: exit status 1

jakecoble commented 10 months ago

Looks like omnibot tried to reply to a command after the timeout, which IIRC is 3 seconds by default and 15 minutes if we call deferReply (we don't, currently).

jakecoble commented 10 months ago

I've reproduced the bug and fixed it. It was indeed the timeout.