canceled outcome

I'm using a worker as a discord http interaction bot, but came across a problem when i need to defer a reply. Deferring is basically telling discord that you need a more time to send a reply, rather than the 3 seconds. so after it's deferred, discord closes the connection, as its expecting another request later on, which to my best guess, causes the worker to stop. is it possible to keep the worker open after this, or are there any clever workarounds?
2 Replies
Cyb3r-Jak3
Cyb3r-Jak32y ago
You can do ctx.waitUntil(<promise>) before returning and it will keep the worker alive until the promise resolves
Khafra
KhafraOP2y ago
it worked, tysm
Want results from more Discord servers?
Add your server