Discord Bot Generator
You own the code, and it is checked before you get it.
Describe what the bot should do. You get a TypeScript project that compiles, has no removed discord.js API in it, and has already started once in a sandbox. Build it as a normal Node bot, or as a resource that runs inside your FiveM server.
First build free · no card · the code is yours to keep
Four checks run before you see it
Generating code is the easy half. Anything can produce a file that looks like a Discord bot. The question is whether it runs, and that is a question you can answer mechanically instead of hoping.
It compiles
A full TypeScript build under strict mode, over the whole project rather than a spot check. No implicit any, no unchecked casts, no non-null assertion left lying around.
No dead API
discord.js v14 removed a long list of v13 names and deprecated more inside v14 itself. Both get scanned for, including the ones that still compile and only warn once at runtime, which is exactly when nobody is looking.
It is shaped like a project
Nineteen structure rules. Entry point present, discord.js actually declared as a dependency, no bot token pasted into a file, no single file holding six commands behind a switch. Six of them only apply to the FiveM build, where the runtime is stricter than Node.
It starts
The project boots in an isolated container with no network access, read only, under a hard timeout. A bot that compiles and then crashes on startup has failed the build, and gets sent back for repair.
When a check fails, the generator repairs and checks again, up to three rounds. You watch that happen rather than waiting behind a progress bar, and if it cannot fix something it says so instead of handing you a stub.
What lands in the zip
my-bot/
package.json
tsconfig.json
.env.example
src/
index.ts build the client, wire handlers, log in
config.ts environment parsing, validated once
deploy-commands.ts registers commands with Discord
lib/
command.ts the Command type
load-commands.ts reads src/commands
load-events.ts registers each handler
commands/
ban.ts one command per file
timeout.ts
events/
interaction-create.ts
client-ready.tsOne file, one job
One command per file, one event handler per file, nothing over about 150 lines. You can find the thing you want to change by reading the file names.
Configuration in one place
Environment variables are read and validated in a single module, so a missing token fails at startup with a clear message rather than as a null reference somewhere inside a command an hour later.
No placeholders
No TODO comments, no empty function bodies, no README describing features the code does not have. If something could not be built, it is named in the summary.
Two places it can run
This is asked before anything is written, because it changes the module format, the manifest and how the bot reaches your data.
Standalone
An ordinary Node project. npm install, npm start, host it wherever you host things. Nothing about it depends on us once you have downloaded it.
FiveM resource
Runs inside your FiveM server, so it reads the live player list directly and needs no second host. Six extra structure rules exist just for that runtime.
How the FiveM target worksHow it works
Describe the bot
Plain language, the way you would explain it to someone. Which commands, who is allowed to run them, what happens when they do. Pick standalone or FiveM resource up front, because that choice changes what gets written.
Watch it get built and checked
Files appear as they are written and you can read them while the build runs. When a check fails you see which rule, in which file, and the repair round that follows. Up to three rounds, then it stops rather than looping.
Download it, or keep changing it
The whole project as a zip, ready for npm install. Or describe the next change and it edits the existing files instead of starting over, then reruns every check.
The v13 code that models still write
discord.js v14 renamed most of the builder API. There are years of v13 tutorials in every model's training data, which is why a generic assistant confidently hands you code that has not compiled since 2022. These are scanned for by name.
| Written by v13 habit | What v14 needs |
|---|---|
| MessageEmbed | EmbedBuilder |
| MessageActionRow | ActionRowBuilder |
| MessageButton | ButtonBuilder |
| MessageSelectMenu | StringSelectMenuBuilder |
| Intents.FLAGS.GUILDS | GatewayIntentBits.Guilds |
| Permissions.FLAGS | PermissionFlagsBits |
| client.on('message') | Events.MessageCreate |
| { ephemeral: true } | { flags: MessageFlags.Ephemeral } |
What it costs
Credits, not a seat. The numbers below are what bot jobs have actually been charging since the August billing fix, not a rounded-up sticker price.
| Step | Credits | On the $9.99 plan | Detail |
|---|---|---|---|
| First build | Free | No card | One complete project, checked and downloadable, on a new account. |
| A build after that | around 100 credits | about $0.13 | Depends on how much the bot does. Small utility bots land lower, a moderation suite higher. |
| A change to a finished bot | around 90 credits | about $0.12 | It edits the existing files instead of rebuilding, so a change usually costs less than a build. |
| Hosting | Not sold here | - | The project runs on your machine, your VPS or inside your FiveM server. Nothing to cancel. |
Credits come from your plan or a one-off top-up and work across every tool here. See the plans
Against the other ways to get a bot
Hosted builders put a working bot online faster than anything here, and they should be your choice if you never want to touch code. The moment you do want to touch it, the difference is whether there is any code to touch.
| Feature | SwisserAI | Hosted bot builders | zdiscord | ChatGPT or Claude |
|---|---|---|---|---|
You get the source code Every command, event handler and config file | Yes | No | Yes | Yes |
Written for what you described | Yes | Partial | No | Yes |
Compiled before you get it Full TypeScript build, strict mode | Yes | No | Partial | No |
Scanned for removed discord.js API | Yes | No | No | No |
Started once in a sandbox | Yes | No | No | No |
Runs inside a FiveM server as a resource | Yes | No | Yes | Partial |
Keeps running if you stop paying | Yes | No | Yes | Yes |
Hosting included Where the hosted builders are genuinely ahead | No | Yes | No | No |
Free tier | First build free | Usually capped | Free, open source | Free tier, no checks |
The rest of the workshop
FiveM script generator
The same idea applied to Lua, written against the real QBCore, Qbox and ESX APIs.
Resource merger
Combine several asset resources into one clean streamed resource. Free, no login.
Setup guide
Token, intents, invite scopes and running it, step by step, with the errors people actually hit and what each one means.
Frequently Asked Questions
The first build is free and needs no card. After that, real jobs since the August billing fix have been landing around 100 credits for a build and around 90 for a change to a finished bot, drawn from the same credit balance as everything else on your account. On the $9.99 plan that is roughly 13 cents a build. New accounts start with 250 credits, so the first change after the free build is covered too.
Yes, the whole project as a download: every command, every event handler, the config module, the command registration script, package.json and tsconfig.json. It runs on your machine with your own bot token and no account here.
That is the main difference to the hosted bot builders. There the bot lives on their infrastructure and the code is either unavailable or a paid export, so when the subscription stops, the bot stops.
A TypeScript project against discord.js 14.x. One file per slash command, one per event handler, strict types throughout, environment variables read and validated in a single module.
Command registration is a separate script rather than something the bot does at startup, because registering on every boot burns rate limit and turns a crash loop into a rate limit ban.
Yes, and it runs inside the server as a resource rather than beside it. That means one process instead of two, no second host to pay for, and direct access to the live player list without an HTTP round trip.
The generator writes the fxmanifest, targets the CommonJS module format the FiveM runtime needs, and checks all of it as its own rule set.
Those give you a configured bot on their hosting. This gives you a codebase. If you want a new command later you edit a file instead of waiting for a feature, and if you stop paying, the bot keeps running because it was never on our infrastructure.
The trade goes both ways and it is worth being honest about: a no code builder is faster if you never intend to touch code at all.
That is the failure this was built around. The generator writes against a searchable copy of the discord.js typings, the official guide and the Discord API reference, so it confirms spellings rather than remembering them. Then the output is compiled. A method that does not exist does not compile, so it never reaches you.
Yes. Describe the change and it edits the existing project rather than starting over, then reruns every check on the result. The file list shows exactly what it touched, and you can read any file at any point during the build.
Create the application in the Discord Developer Portal and copy the bot token, enable any privileged intents the bot needs, and run npm install followed by the command registration script. The generated README lists which intents your specific bot requires. For a FiveM resource, drop the folder in your resources directory and add it to your server config.
The setup guide at ai.swisser.dev/discord-bot-setup walks every one of those steps with the exact button names, what you should see after each one, and the errors people actually hit.
Build your first bot free
Describe what it should do, watch it get written and checked, download the project. No card, and the code is yours.