From e7608edd0eae56f341f5a0dbee16f7a53347f7ec Mon Sep 17 00:00:00 2001 From: Yessiest <70776062+yessiest@users.noreply.github.com> Date: Mon, 9 May 2022 07:53:03 +0000 Subject: [PATCH] Updated Aliases (markdown) --- Aliases.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Aliases.md b/Aliases.md index aa3b46e..fae5915 100644 --- a/Aliases.md +++ b/Aliases.md @@ -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. \ No newline at end of file