Updated Aliases (markdown)

Yessiest 2022-05-09 07:53:03 +00:00
parent 47ac0a3a89
commit e7608edd0e
1 changed files with 9 additions and 1 deletions

@ -23,7 +23,7 @@ Rules of this server:
## Arguments
Sometimes you might want to pass additional arguments to the command inside an alias.
There are multiple way to do so:
1. Specify a single argument using a dollar sign (``$``) and the numeric position of the argument
1. Specify a single argument using a dollar sign (``$``) and the numeric position of the argument
2. Specify the entire text after the alias using ellipsis
Examples:
@ -37,3 +37,11 @@ When ``!speak`` alias is used, anything after it will be passed to the ``/speak`
```
When ``!exp`` is used, the first argument (the first piece of text after the command ending with a space or a newline) is passed into the formula ``n^2``, which is then passed to the ``/calculate`` command.
***
_Note:_ If you're using a string as a single argument and it contains spaces, you should quote the string when passing the argument, like so (assuming `/alias !echo "/speak You said: $1"`)
```
!echo "This is a string with spaces as a single argument"
```
This isn't needed with `...` syntax because it passes all available arguments.