Hello. I am relatively to Twitch, and have been modded on a few channels and tasked with maintaining their chat commands. What I’m wondering is if anyone can direct me to page with IN DEPTH information on chat commands through Nightbot. I have already gone through the Nightbot docs and searched high and low on Google and keep coming up with the same results. “How to set up Nightbot”. This is for new streamers, not a mod doing commands on another persons channel. Basically, I need a break down of all the syntax would be great. TIA
Nightbot comes with a set of default commands. They are documented here: https://docs.nightbot.tv/commands/commandlist
As a streamer or a moderator for a streamer, you can create your own custom commands. The syntax to add a command is:
!commands add [command name] [command response]
For example, to add a command
!hi that makes Nightbot say “Hello world!” you would type:
!commands add !hi Hello world!
You would use the command simply by typing
!hi in chat:
User: !hi Nightbot: Hello world!
The syntax for editing an existing custom command is:
!commands edit [command name] [new command response]
For example, to edit our newly created command
!hi so it makes Nightbot instead say “Hello there!” you would type:
!commands edit !hi Hello there!
The syntax for deleting an existing custom command is:
!commands delete [command name]
For example, to delete the command
!hi you would type:
!commands delete !hi
!hi Nightbot will no longer respond if a user says
!hi in chat.
!hi command I set up above is a very simple example of a custom command you can create. You can make commands more complex and dynamic through the use of command variables which are documented here: https://docs.nightbot.tv/commands/variables
It would take a very long time to explain the usage of all of the command variables, and I believe the Nightbot docs already does a solid job at doing that, so I’ll just give one example of using a variable.
Let’s say you want to create a command
!hi that makes Nightbot respond with “Hello [user]!” where
[user] is the name of the person using the command. You would use the user variable. You would type:
!commands add !hi Hello $(user)!
$(user) variable in the syntax? Whenever someone uses
$(user) variable will be replaced with their username.
So if I were to use this command, this would be what you see in chat:
RokettoJanpu: !hi Nightbot: Hello RokettoJanpu!
Hope this helps!
That helps a bit, but how about this
Im trying set up !splash where a user would “splash” another user with water
I want it to like this:
Nightbot: (USER) has splashed (2NDUSER)
Use the touser variable.
!addcom -cd=5 !splash $(user) has splashed $(touser)
I used !addcom, it’s not documented but it works the same as !commands add, and I’m specifying the command cooldown to be the minimum 5 seconds.
!addcom is what i have been using. Thanks a lot!
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.