Menu

Free Discord bot hosting without an always-on server: use an Interactions Endpoint URL
📰

Free Discord bot hosting without an always-on server: use an Interactions Endpoint URL

DEV Community: serverless·Hüseyin Poyraz Küçükarslan·2 days ago
#nfWfjOrt
#devtoserverless#devto#dev#discord#endpoint
Long article (1575 words) — no AI summary yet.
Reading 0:00
15s threshold

Originally published on gregale.dev . I build Gregale, so read this as a vendor's page. Competitor details come from each vendor's own docs, linked in the post. This post was written with AI assistance.

A Discord bot that only answers slash commands does not need a server running all day: give it an Interactions Endpoint URL, and Discord sends each command to it as an HTTPS request. The bot must check the request's Ed25519 signature and send its first response within 3 seconds. On Gregale, the endpoint on this page has no dependencies beyond Node.js, wakes from a parked snapshot in about a quarter of a second, and costs nothing between commands.

Gateway or endpoint

Discord delivers interactions one of two ways, never both:

Over the Gateway , a WebSocket your bot keeps open. This is the default, and what libraries such as discord.js use. The connection has to stay up, so the bot runs all the time.

To an Interactions Endpoint URL , a public HTTPS URL you set in the app's settings.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.