Referencing commands

How would you reference a command within a command, say i have a command called !counter where the second value in the string is a number, and i have another command called !output which concatenates that number with a string. Is it possible to pass that value to another command or is another component needed?

Alias are required for something like this and a fair bit of understanding Nightbot commands. I would recommend checking out Multi-stream link with Nightbot as that also passes a value to edit another command.

Here’s a basic example:

!commands add !currentcount The current count is:
!commands add !setcount -ul=moderator -a=!commands edit !currentcount The current count is: $(1)

In a chat this looks like:

Owner/Moderator: !setcount 14
Nightbot: The command “!currentcount” has been edited successfully.

User: !currentcount
Nightbot: The current count is: 14

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.