What a Discord bot actually costs to run
The answer for most bots is close to nothing, and the reason is a design choice made before a line is written: whether it listens, or waits to be asked.
- Discord
- Serverless
- Ed25519
- Next.js
In short
How much does it cost to run a Discord bot?
For a bot that answers slash commands, close to nothing — it needs one HTTPS endpoint Discord can post to, which runs on the hosting a site already has and costs fractions of a cent per command, with no process awake between invocations. For a bot that holds a gateway connection, because it reads every message or handles voice, it is the price of a small server running continuously, whether or not anybody uses it. The choice between the two is made before any code is written, and most bots that were built as gateway bots did not need to be.
01
Two kinds of bot, and only one of them costs money
Every Discord bot is one of two shapes. A gateway bot opens a WebSocket to Discord and holds it open, receiving every event in every server it is in — messages, joins, reactions, typing. It has to be awake at all times, because the connection is the product. That is a process running twenty-four hours a day whether anybody uses it or not.
The other shape waits. Discord posts to an HTTPS endpoint you nominate when somebody runs one of your slash commands, you answer within three seconds, and nothing of yours is running in between. On any serverless host this is a function invocation: milliseconds of compute, measured per command, on infrastructure a website is already paying for.
Most of the bots people describe to us are the second kind wearing the first kind's clothes. If the honest description of what it does is ‘somebody asks it something and it answers’, it does not need to see a single message.
02
The bill, in real numbers
Scorebug’s bot answers seven commands from live sports data. It runs as one route in the marketing site’s existing deployment. A command costs one function invocation and a few tens of milliseconds, and the rendered card it replies with is cached for a year, because a card is a pure function of its URL and the same parameters can only ever draw the same pixels.
At that shape, the marginal cost of the bot is not a line item you would notice. There is no separate host, no container, no keep-alive ping, and no idle process to pay for on the days nobody runs a command.
A gateway bot for the same product would have meant a small always-on instance, a process supervisor, and a reconnect strategy for the times Discord drops the socket — real money, and more importantly real operational surface, in exchange for capabilities the product never needed.
03
What you actually pay for instead
The cost of a bot lands in the build, not the bill. It is in the data it answers from: the query that has to be fast enough to return inside Discord’s three-second window, the empty state for a team nobody has logged yet, the autocomplete that has to feel instant while somebody is still typing.
And it is in the verification. Discord signs every request it sends with Ed25519, and your endpoint must reject anything that fails the check — otherwise anyone who learns your URL can make your bot say things. That check belongs in front of every request, not inside the handler, and it is the one part of a Discord build that is worth being pedantic about.
const key = await crypto.subtle.importKey(
"spki",
spkiFromRawEd25519(publicKey),
{ name: "Ed25519" },
false,
["verify"],
);
const ok = await crypto.subtle.verify(
"Ed25519",
key,
hexToBytes(signature),
new TextEncoder().encode(timestamp + rawBody),
);
if (!ok) return new Response("bad signature", { status: 401 });04
The permission that decides everything else
A slash-command bot needs one permission: to send messages. It cannot read message history, it cannot see your member list, and it receives nothing except the command somebody typed. That is worth saying out loud to a moderator, because it is always their first question, and because a bot that cannot read a room cannot leak one.
It is also the cheapest security posture available. The worst case for a leaked token on a bot with Send Messages is embarrassing. The worst case for a leaked token on a bot with Administrator is somebody else’s server.
05
The part that is free and almost always skipped
Discord invites expire, get revoked and get regenerated, and a discord.gg link ranks for nothing — those pages are not indexed and the link carries no text a search engine can read. So every place a community prints its address, it is printing something temporary that no one can find.
A page on your own domain fixes both. It ranks for your name plus the word discord, which is the highest-intent search a small product gets, and it survives the invite changing because only one constant has to be edited. It costs one route. Scorebug’s is at getscorebug.app/discord, and it carries the bot’s own application record with every command listed as a feature, so an answer engine asked whether a Discord bot rates sports games has something specific to quote.