How to run discord.js in a serverless environment?

I want to build a bot using discord.js,It runs in cloudflare workers,How can I use discord.js to develop this bot?
4 Replies
d.js toolkit
d.js toolkit7mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - Marked as resolved by OP
chewie
chewie7mo ago
discord.js is not meant for serverless environments
d.js docs
d.js docs7mo ago
HTTP-only applications receive interactions through HTTP webhooks instead of the Discord Gateway. Bots that are not connected to the Gateway, but use HTTP interactions appear as online without a status. Discord.js does not support HTTP interactions. Use discord-interactions instead.
dijkstrazz
dijkstrazzOP7mo ago
Got it ,thank you!
Want results from more Discord servers?
Add your server