Aliasing Commands

Command aliasing is used to make one command call another command. For example, maybe you don't like the "!songrequest" command and you'd prefer it be called "!addsong". Or maybe you have a shop item that people buy using "!buy 2" but you would rather it be "!buy item". For the example below, we will alias the "!songrequest" command. To pass all the command arguments through we will need to use the $(query) response variable:

The $(query) variable outputs all of the text following the command's name. In the following example, the command name is "!addsong" and $(query) is "Riot Overkill Monstercat":

!addsong Riot Overkill Monstercat

Let's make a command alias!

1. Log in to your Botisimo account and visit the Commands Page

2. Click on the "Create New +" button in the top left

3. Set the name to

!addsong

4. Set the response to

$(query)

5. Set the alias to

!songrequest

6. Click "Save" button at bottom of form

That's it! Now when someone uses the "!addsong" command it will take all the arguments and pass them through to "!songrequest" using the $(query) variable. When a user issues a command like

!addsong Riot Overkill Monstercat

it is the same as them doing

!songrequest Riot Overkill Monstercat


Be sure to check out the other command variables in Botisimo to start making more powerful custom commands https://botisimo.com/docs/variables

Is this article helpful for you?