How to use one count in two commands

Asked Jun 19, 2020·5 replies·Last activity 6 years ago·Open in Discord ↗
Archived from the original community forum
Things may have changed since it was written. Still stuck? Ask the community on Discord.

ex.
!commands add !number1 $(eval var count = '$(count)'; text : ${count} text ${count} text)
!commands add !number2 $(eval var count = '$(count)'; text : ${count} text ${count} text)

1. !number1 -> text 1 text 1
2. !number1 -> text 2 text 2
3. !number2 -> text 1 text 1 (x)
text 3 text 3 (o)
4. !number1 -> text 4 text 4

I have two commands that output the same content.
However, when number1 is entered, the command of number2 is not output, but can the count be increased?
The opposite is also true.
In other words, I want to modify so that one count is shared by the two commands number1 and number2.
Is this possible......

5 replies

Hey @Nutty Mammoth!

It looks like an alias command would be the fit for your case:

!addcom !number1 $(eval var count = `$(count)`; `text : ${count} text ${count} text`)
!addcom !number2 -a=!number1

Sorry. This command does not work. -> !addcom !number2 -a=!number1
And I corrected the number 3 in the text.

1. !number1 -> text 1 text 1
2. !number1 -> text 2 text 2
3. !number2 -> text 1 text 1 (x)
text 3 text 3 (o)
4. !number1 -> text 4 text 4

You must have made a mistake when you entered the commands, because it does work:

vKK7QBdYAu.png

If you're setting up the command from the dashboard, the following might help you...

The -ul= , -a= , and -cd= parameters are to be used only if you add the commands from the chat, if you use the dashboard to add new commands you have to fill the boxes corresponding to each parameters:

X29rmiibH9.png

Thanks for the reply. I solved this problem perfectly thanks to your help. Thank you very much. T^T

Didn't find your answer? The community is on Discord.

Ask on Discord