Getting started
How to write prompts that give you a working Discord bot
What to include when you describe a Discord bot to an AI: commands, permissions, data, messages and limits, with good and weak examples to copy from.
The quality of a generated bot depends a lot on the description. The AI fills in whatever you leave open, and it may choose differently from what you wanted. A good description is short, specific and complete in the parts that matter. These rules come from seeing what works.
Name the commands
Say which slash commands you want and what they take. "A /warn command with a member and a reason" is clear. "Some moderation" is not. If you want buttons, say where they appear and what they do.
Say who may do what
For each command, decide who can use it: everyone, a role, or members with a permission such as Manage Messages. Give the role by name. If you leave it open, the AI may leave a powerful command open to everyone.
Decide where data lives and what happens on restart
If the bot remembers things, such as warnings, XP or open tickets, say so. BotsMaker saves data in JSON files. Add "survive restarts" if it matters, for example for giveaways with timers.
Give the messages and the style
Say how the answers should look: an embed, a color, a short sentence. Put things that you may want to change into the config file by asking for it: "keep all texts in config.js".
Add limits
Cooldowns, maximum lengths, maximum numbers and rate limits keep a bot safe and cheap. "One open ticket per member" and "10 second cooldown per user" are the kinds of limits to write down.
Weak and strong examples
- Weak: "Make a fun bot."
- Strong: "A trivia bot: /trivia starts a question with four buttons, one correct answer, 15 seconds to answer, and /leaderboard shows the top 10 by correct answers."
- Weak: "A ticket system."
- Strong: "A ticket bot: /ticketpanel posts a button; clicking it creates a private channel for the user and the Support role; a Close button deletes it after 5 seconds."
Build in small steps
Start with the core and add features in later messages: "add a /remindme command", "log every action in a mod-log channel". Each change keeps the earlier code and saves the old version.
Things to leave out
- Requests that break the Discord rules, such as mass DMs, raid tools or self-bots. These are refused.
- Vague hopes such as "make it work well". Give numbers and rules instead.
- Long stories. Lists of commands work better.