Skip to content

Bot type

Discord moderation bot maker

Describe the rules of your server and get a moderation bot with the commands you want, a warning history and a mod log.

Make this bot 5 free credits, no card needed

Most public moderation bots do everything and ask for Administrator. A custom bot can do exactly what your team needs and nothing else: a short list of slash commands, the permissions it really requires, and a log that fits how your moderators work.

Describe the actions you want, how warnings should behave, and where logs go. BotsMaker writes the bot in discord.js v14 with permission checks, role hierarchy checks and a JSON file for warnings, then runs it once with every command executed before you download it.

Example description

A moderation bot with /kick, /ban, /timeout and /warn. Warnings are saved per member, /warnings shows them, /clearwarnings removes them, and every action is logged in a mod-log channel that is set with /setlogchannel.

Commands and parts

  • /warn @member reasonsaves a warning and logs it
  • /warnings @memberlists the warnings of a member
  • /timeout @member minutes reasonmutes a member for a set time
  • /kick and /banwith reason and hierarchy checks
  • /setlogchannel #channelwhere actions are logged

What a good moderation bot checks before it acts

A moderation command must refuse to act on someone the bot cannot manage. That means checking that the target is not the server owner, that the bot role is higher than the target role, and that the moderator running the command has a higher role than the target. BotsMaker asks for these checks in every moderation command and tells the moderator why a command was refused.

Permissions the bot should have

Set the default member permission of each command so that Discord hides it from people who should not use it, for example Kick Members for /kick and Ban Members for /ban. Then give the bot only the permissions it needs in the invite link. You do not need Administrator.

  • Kick Members and Ban Members for those commands.
  • Moderate Members for timeouts.
  • View Channels and Send Messages in the log channel.

Warnings and logs that you control

Warnings are stored in a JSON file next to the bot, so there is no database to set up. Each entry keeps the member id, the moderator id, the reason and the date. The mod log is an embed in a channel you pick with /setlogchannel.

If you want automatic steps, ask for them in the description: for example a timeout at three warnings, or a kick at five.

Add automod rules

You can describe simple rules such as deleting messages with invite links from members without a role, or slowing down a channel. These need the Message Content intent, which you switch on in the Developer Portal. BotsMaker lists every privileged intent in the summary and in the README.

Questions

Does a moderation bot need the Administrator permission?⌄

No. Give it only the permissions its commands use. Administrator also bypasses channel permissions, which makes mistakes much more dangerous.

Can it ban members who are not in the server?⌄

Yes, if you ask for it. A ban by user id works for members who left. Mention it in the description.

Where are warnings stored?⌄

In a JSON file in the data folder of the bot. Back that folder up like any other file. For a very large server a database is a better fit, and you can ask for one in a later version.

Related guides

Other bot types