Skip to content

Bot type

Discord AI chatbot maker

A bot that answers with an AI model. You choose the model, the personality and the limits.

Make this bot 5 free credits, no card needed

Many servers want a helper that can answer questions about their game, rules or community. The bot itself is simple: a slash command takes a question, calls an AI API and posts the answer. The important parts are the limits that keep it cheap and safe.

BotsMaker writes the command with a per-user cooldown, a cap on question and answer length, mention filtering and a system prompt for the personality you describe. The API key lives in environment variables, never in the code.

Example description

An AI chat bot: /ask <question> answers using an OpenAI-compatible API from env vars (AI_API_KEY, AI_BASE_URL, AI_MODEL). The bot has a friendly pirate personality, a 10 second cooldown per user, answers cut to 1500 characters, and never pings @everyone.

Commands and parts

  • /ask questionsends the question to the AI and posts the answer
  • /setpersona textoptional command to change the personality
  • .env: AI_API_KEY, AI_BASE_URL, AI_MODELany OpenAI-compatible endpoint

Bring your own model and key

The generated bot talks to any OpenAI-compatible chat completions API. That covers many providers and local servers. You put the key, the base URL and the model name into the .env file. BotsMaker never sees them and they are not part of the code.

Costs and abuse protection

An open AI command can become expensive if members spam it. The bot gets a cooldown per user, a limit on the question length and a limit on the answer length. You can add a daily cap per member or restrict the command to a role.

Safe answers in a server

The bot turns off mentions in its replies, so a member cannot make it ping everyone. The system prompt tells the model to stay on topic. Ask for extra rules such as refusing certain topics.

Slow answers

AI calls can take longer than the three seconds Discord allows for a first reply. The bot uses deferReply, shows the typing state and edits the answer when it is ready.

Questions

Does the bot remember the conversation?⌄

By default each /ask stands alone. You can ask for a short memory per channel or per member, which uses more tokens.

Which AI provider does it use?⌄

Any provider that offers an OpenAI-compatible endpoint. You choose it with the environment variables.

Is it free to run?⌄

The bot is free software on your own host. The AI provider charges for usage, so use the limits.

Related guides

Other bot types