Aliases
Aliases allow you to add a different trigger for a command.
Creating aliases
Creating an alias is very simple! All you need to do is run the alias add [shortcut] [command]
command.
Below is an example of boot
being made as an alias for kick
.
An alias being created
When the boot
alias is invoked, it will run the normal kick
command.
Boot being invoked
Arguments in Aliases
Arguments might seem complicated at first, but they’re very simple once you figure out how they work!
Arguments start from 0
. The first argument in a command is the word after the command name. For example:
To represent an argument in an alias, put the argument number in curly brackets.
Below is an example of creating an alias with arguments.
Looking at the timeout
command syntax, you can see it’s timeout [member] [duration] [reason]
.
Replacing the [member]
parameter in our alias with {0}
will make bleed timeout the first argument in our alias for 10 minutes.
When running the shh
command with a member mention as the first argument, bleed will timeout the member for 10 minutes.
Adding an alias with arguments and using it
Image Permissions
Bleed doesn’t add image permissions to a role, it only adds the role to a member.
Make sure you give the role image permissions if you want to set this up.
One of the most popular uses for aliases is adding image permissions to a member with the simple pic
command, so let’s set that up!
Run the command alias add pic role {0} [image permissions role]
.
Adding an alias for granting the image permissions role and using it
Whenever you run the pic [member]
command, bleed will apply your image permissions role to that member, granting them permissions to upload media.
You aren’t limited to just the first argument in aliases, you can use as many arguments as you want!
A smart way for finding the argument number is by choosing which argument you want, for example, the third argument, then subtracting one from that number.
The argument number for the third argument would be 2
.