ToUser and !readrun

So basically i want the code to read the specific command !readrun which contains a string, with a command !re editing it, but ive put a third command for the $(touser) var so i dont have to continually put in $(touser) into the !readrun but everything ive tried either dosen’t work or wont tag the user.

It goes !re editing !readrun for the string and !run for putting the $(touser) $(query) for !readrun It works perfectly expect for not tagging the user with $(touser)

Variables used in the editing of commands aren’t resolved to their respective use because you wouldn’t be able to use them.

For example !commands edit !user $(user) wouldn’t change the command to Aaron128l. It would change to the variable name $(user).

Doing something like this is possible through the Nightbot API however.

1 Like

Do you have an idea on how i could do this !re(!commands edit !readrun $(query)), !run(!readrun $(touser)$(query)), !readrun(Whatever you put in after !re)

I technically don’t need this i can just type $(touser) before i type in the run information its just more of a simplifying ease of access thing but it would be amazing if you could tell me how to achieve it. Thanks

I’m not exactly sure in what your trying to do. Other than just for the case of simplifying a command, perhaps just manually edit it on the Nightbot Command Page rather than just entering in chat.

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