I searched a lot of information, and didn’t get the answer.
I want to set a command. hope it would work like:
input: !hello tony output: good morning! tony
or if I only call the command, like:
input: !hello output: good morning! XXX
XXX should be the name who call this command. I hope the user name is the default value of my command.
I have known [user] is a variable, but I don’t know how to set a default for my command.
How can I do this? I can’t find if-else in nightbot. please help
!commands add !hello Good morning $(touser)!
If you type !test Hello (case-sensitive) Nightbot will respond with “Hello there!”… otherwise it’ll respond with “Ok then”.
@xgerhard: thanks! I didn’t realize $(touser) have a default value.
I never think of there’s a default for normal command.
I have already set my command. Thanks a lot !
but I have no idea how to use, especially its variable. It is very helpful. Thx
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.