Hosting on Deno Deploy
I'm hosting my bot on
Deno Deploy
https://deno.com/deploy
it's working great but after some time it goes offline.
I tried:
but the 'disconnect' event is not getting fired.
What else could i try to make it keep online?42 Replies
- 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 staffthats because there is no
disconnect
event goes idle after some time if it dont receive any request, and it makes the bot goes off
as long i ping the server the discord bot get on again
ill try this to see if it keep the bot on
Serverless architecture is not designed for this though
And that's not 5m
also pretty sure this would set off some sort of alarm that a bot is sending a message to the same user every so often
i was testing the timer, forgot to modify it back to 60
big yikes here
5 min is not so often
and i need to check how long it takes to make the server goes idle
i think its 10min+
If you need to keep the host from shutting off your application, then its not a good host for a discord bot
im also hosting a mongodb together it
Invest in proper hosting, either by paying for the service or using a reputable services free tier, like oracle and amazon
im already using deno for other things
If you want to keep using deno, thats your choice
Deno deploy is really only meant for HTTP only interaction bots, not for full standing bots
that message thing discord send "only you can see" something like this
isnt possible to create messages like that?
Those are interactions, and yes it is possible to respond to interactions that only the person that sent the command can see
by sending a dm?
i mean this
you can have DM slash commands, yes.
Those are ephemeral responses, meaning only the person that sent the command can see it.
yes
do you have any link to this api?
ty
is possible to hide this?
For interaction commands, no
i mean, make a command stealth
im lf something that user can interact with the bot privately
theres any other option than dming the bot?
Ephemeral replies will hide the original message from everyone. If you want it to respond publicly without the command, you can use
<interaction>.followUp()
this would still be visible dont it?
No, it will be tagged to the original interaction reply
ive no idea whats this, ill search
youll see this if you use
followUp()
after using reply()
is it also possible to create commands where user can input data?
Yes, its called command options
do you have any pic about how it looks
about what?
input command
thats how options look
cool
the server went offline even the bot pinging the user
As I said earlier, deno deploy is not meant for discord bots that use full fledged packages like discord.js
It is meant for HTTP Interaction bots, meaning discord sends you requests via an API you created and you respond back to the API request from discord.js
i see
i figured out how to use the ephemeral thing
really cool
thanks for the help Kevin