Back | Blog
Gabriel Becker

Gabriel BeckerDiscord

How to use Discord slash commands with Boto

Cover Image for How to use Discord slash commands with Boto

Unlock a universe of possibilities with Discord Slash Commands

Learn here how to set up a bot triggered by commands and understand how the Discord Slash Commands block works.

Watch the video if you want to jump-start:

Let’s start simple, by setting up a bot from the recipe “Get crypto prices with Discord slash command”. This bot allows you to get the latest exchange price of a crypto (like ETH or BTC) on a Discord channel.

Use this recipe to create a bot: https://boto.io/bots/53562/. It should look like this:

[object Object]

Select the same Channel on both Discord Slash Commands and Discord Pro blocks. If the channel you want is not on the list, follow the steps in here. Then, save the bot and turn it on.

On the Discord channel, enter the /run command with these parameters:

[object Object]

The bot should answer with the updated price:

[object Object]

If you didn't get the message, you can find some help on how to debug it in this doc.

How the Discord Slash Commands block works

[object Object]

The Channel is where the command will be available. The command needs to be set by channel, not by server.

The Command is the keyword to invoke this command. It’s the first parameter after /run.

[object Object]

The next parameter, the argument, is optional and allows users to pass on extra arguments to the slash command.

[object Object]

To access the argument in your bot, use output tag #command_argument from the Discord Slash Command block. In the example bot, we feed it into the Crypto to USD to get the latest price.

[object Object]

Finally, use the Help text to explain what the command does and how to use it. Once you have saved and turned on your bot, you can check the list of commands in a channel by entering /commands_available

[object Object]

The Help text shows up there to describe the command.

[object Object]

That's it! Now you know the basics to unlock all that Discord potential. Have fun!

Need any help? Join our Discord or email us: info@boto.io

Explore all of our no-code bot recipes, created and shared by people like you: https://boto.io/bots

Check out what we’re up to on Twitter: https://twitter.com/boto_io

boto-logo

Discord

Slash-commands

Share
Gabriel BeckerAbout Gabriel

Gabriel Becker is the Head of Customer Success and Operations at Boto.io and has worked with IT systems integration, automated intralogistics and operations management. He studied Control and Automation Engineering and an did an MBA at INSEAD. Need any help with Boto? He'll be there for you!

Related Articles