How to make Discord custom commands

Discord custom commands are commands you add yourself. A custom command Discord bot runs them, because Discord has no built-in way to add your own. With Voinly you create them in the dashboard: pick a name, write the reply, and the command works with your prefix and, if you want, as a slash command. It is free and needs no code.

Updated

What custom commands are good for

Discord custom commands are shortcuts your members or staff type to get a fixed answer. A custom command Discord bot is what runs them, because Discord has no setting for your own commands. Instead of explaining the rules or pasting the same links again and again, someone types !rules and Voinly posts them. Common ones:

  • Info answers: rules, social links, how to apply, the server's IP for a game server.
  • Staff shortcuts: a standard reply for a common question, sent as a DM or only visible to the member.
  • Role commands: !notify to toggle a ping role, or a command that gives an event role.
  • Fun: an answer picked at random from up to 10 responses, like a custom 8-ball.

Can Discord do custom commands on its own?

No. Discord's slash commands all come from apps, and there is no setting to add your own reply to a word. The closest things without a bot are pinned messages, a rules or FAQ channel, and in Community servers the onboarding questions. They work, but members have to go and look; a command brings the answer to the channel they are in.

Prefix command or slash command?

Every Voinly custom command works with your prefix, which is ! unless you changed it in Bot settings. Turn on Add as a slash command and it also appears in Discord's / menu with its Description, which helps members find it. The difference:

Prefix and slash versions of the same custom command
PrefixSlash
How members run itType !rulesType / and pick it from the menu
Other namesUp to 10 AliasesOnly the main name
InputWords after the name fill {args}An optional input box, described by Input description
Only the member sees itSent as a DM insteadA private reply in the channel

Variables for responses

Responses can use the same variables as every Voinly message, like {user} for a mention of the member and {server} for the server name. Custom commands add the words typed after the command:

  • {args}: everything typed after the command name.
  • {args.1} to {args.20}: one word each, so !hug Mika can say "{user} hugs Mika" with {args.1}.
  • {args.count}: how many words were typed.

Custom commands or an auto responder?

A custom command runs when someone types its name. If you want Voinly to answer when a word or phrase appears anywhere in a message, such as "how do I join", use Auto responder instead. Both are on the custom commands and auto responses page, and many servers use both.

How to make custom commands with Voinly

  1. Open Custom commands and turn it on

    In the dashboard, open Custom commands and press "Turn on Custom commands". Then press "New command", or start from an example: Server rules, Social links, Role toggle, Announcement or Random answer. You can have up to 100 commands.

  2. Name the command

    Type the Name: lowercase letters, numbers, dashes and underscores, so rules becomes !rules. A name that is already a Voinly command, like help, is refused, so members never lose a built-in one. Under "More options", add Aliases and a Description.

    Voinly's custom command editor with a rules command, its prefix and slash names, and the Response section
    A command shows both its prefix and slash name once the slash version is on.
  3. Write the response

    Write what Voinly says: text, an embed, link buttons, or all three, with a live preview. Add more Responses and Voinly picks one at random each time. Under Where to respond, choose Reply to the member, Send in the same channel, Send in another channel, Send as a DM or the private option. Delete the response after and Delete the member's message keep busy channels clean.

  4. Change roles (optional)

    A command can also give, take or toggle roles with Give these roles, Take these roles and Toggle these roles, up to 25 each. Toggle gives the role to members who don't have it and takes it from members who do. Voinly's role must sit above those roles in Server Settings → Roles, and Voinly needs Manage Roles.

  5. Decide who can use it and where

    Set Required roles or a Required permission for staff commands, Only works in to keep it to some channels or categories, and Cooldown per member against spam. Admins skip the role and permission checks, but channel limits and cooldowns still apply to them.

  6. Add the slash version and test it

    Turn on Add as a slash command; Discord shows it within a minute of saving. Type something in "Try it" and press "Send test to my DMs" to get the saved response yourself. The test never changes roles. Save, then run the command in your server. /customcommands list shows every command and /customcommands info explains one.

Custom commands guide commands

CommandWhat it doesWho can use it
/customcommands listList this server's custom commands.Everyone
/customcommands info <name>Show what a custom command does and who can use it.Everyone

See every Voinly command

Frequently asked questions

What is a custom command Discord bot?

A custom command Discord bot adds commands Discord does not include. In Voinly you name the command, write the reply, and members run it with your prefix or as a slash command. No code, and it is free.

How do I add Discord custom commands?

Turn on Custom commands in the dashboard, press "New command", set the name and the response, then save. The steps on this page cover aliases, roles, who can use the command and the slash version.

My command does nothing when I type it

Check that Custom commands is turned on and the command's Active switch is on. Use your server's prefix, which may not be !. If the command is limited by Only works in or Required roles, try it where and as someone who is allowed. If it still fails, open Settings → Error log in the dashboard. It lists what Voinly couldn't do in your server and how to fix it (see Something isn't working).

The slash command doesn't show up

Turn on Add as a slash command and save. Discord can take up to a minute to show it, and you may need to restart Discord or switch servers once. Slash commands only use the main Name, not aliases.

Can members see a list of the custom commands?

Yes, with /customcommands list, as long as Include in the command list is on under Options. Turn it off to keep staff shortcuts out of the list.

Why can't the command give the role?

Discord only lets a bot give roles below its own highest role. Drag Voinly's role above the role in Server Settings → Roles and make sure it has Manage Roles. Roles managed by Discord or another app can't be given by any bot.

Are custom commands free?

Yes. Up to 100 custom commands with slash versions, random responses and role changes are free. So is every other Voinly module.

Add Voinly to your server

Every Voinly module is free. The only paid extras are Custom bot and extra AI moderation scans (see pricing). Add it to Discord and set it up from the dashboard.

Add to Discord