Create a Discord slash-command bot (free, serverless)
Discord slash commands can run on a free serverless endpoint. You will define commands, generate a Worker that verifies Discord’s Ed25519 signatures, register commands with a one-off script and add the bot to a test server.
You will practise
- How Discord interactions and signatures work
- Registering slash commands via the API
- Deploying a serverless endpoint
1Brief
Answer a few questions. The generator writes the code; you will read and change it.
2Make
Generate the project, then open every file. Comments explain each part. You can edit files right here.
3Check
Automatic checks for the mistakes that break real projects: invalid config, leaked keys, missing security steps.
4Improve
- Run the check first.
Your change: Add an /about command, re-run register-commands.mjs and test it in your server.5Ship
Cloudflare Workers free plan + Discord Developer Portal (free). Step-by-step instructions are inside
README.md.✓ Added to your tool record on this device. See all 39 tools →
Questions people ask
Why not a normal bot that stays online?
Slash-command bots can use Discord’s HTTP interactions instead of a constant connection, so a free serverless function is enough.
What if Discord will not save my endpoint URL?
Discord sends a signed test request. Saving fails if the public key secret is wrong or missing — re-run wrangler secret put DISCORD_PUBLIC_KEY.
Do I need an AI key to use this?
No. The guided template teaches the same skill with no AI at all. If you add your own free key (Groq, Google Gemini, OpenRouter, Mistral or Cerebras), the tool can also draft and revise. The key stays in your browser and requests go straight to that provider.
Where is my work saved?
In this browser only (local storage), until you copy or download it. Nothing you type is sent to Open Practice.