#How bot run works?

21 messages · Page 1 of 1 (latest)

marsh sky
#

How does the bot launch process work? That is, how can my computer accept requests from the discord server? Is it possible to make a discord bot in the form of a web application for example on "Express"? I know that the question is slightly off topic discord.js, but I would like to know about the internal structure of the library.

tender solstice
#

• What's your exact discord.js npm list discord.js and node node -v version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.

spring apex
#

You need a gateway connection over a websocket to be open to receive events from discord. If you just want an interaction-only bot you can have it run as a web application, but if you want a bot user (which discord.js always has) to get other events you need a permanent connection

marsh sky
spring apex
#

Like @sick heath

sick heathBOT
marsh sky
#

Oh, how I run it like web application?

spring apex
#

It only replies to / or context menu commands as well as buttons/modals. But doesn’t use other events, isn’t logged in to the gateway

spring apex
marsh sky
#

?

spring apex
marsh sky
#

Like on this module

#

Discord-interactions

#

Like, how this will look if I use Express for example?

#

I would be very grateful to you

spring apex
spring apex
marsh sky