Hi so I'm currently working on a way for people to create bot commands via Twitch chat, and I would like to know how I can make code run if there is no $2 (So if the users only types "!addcom") I would like to send them an error message
This is my code thus far:
on *:TEXT:!addcom *:#: {
if ($2 == help) {
msg # SAVE MEH!
}
else {
var -g %usercommand = $2
var -g %userinput = $3-
msg # $nick created command: %usercommand that says: %userinput
}
}
I would like to know if something like this was possible (I have tested it, doesn't work):
on *:TEXT:!addcom *:#: {
if ($2 == $null) {
msg # You haven't specified any command to create
}
}
Any help would be very much appreciated!
Kind Regards
TillableToast