[Twitch] Help needed - 06/07/15 02:04 PM
I've been wanting to make my own bot for a while now and been working on it for a while, but since I have almost no knowledge of these scripts I've been copy pasting most of them. Most of them do in fact work, even the ones I made myself, except for these 3 copy pasted ones.
I've tried many different scripts but none seem to work and I can't figure out why. I've tried changing the .txt's to .ini's and anything I've had come up in my head. I'd appreciate any help.
Also, since I'm going to have the bot in my friends channels too, how can I make so that there are individual commands for individual channels? Such as multiple !twitter commands?
Thanks.
Code:
on *:text:!addcom *:#: { if ($nick isop #) { var %r = $read(commands.txt,ns,$2) if (%r) { .msg $chan [ $+ $nick $+ ]: Error, This command $qt($2) already exists in the database! | return } write commands.txt $2- msg $chan /me + Command $2 has been added to the database! } } on *:text:!delcom *:#: { if ($nick isop #) { var %r = $read(commands.txt,ns,$2) if (!%r) { .msg $chan [ $+ $nick $+ ]: Error, This command $qt($2) does NOT exist in the database! | return } write -dl $+ $readn commands.txt msg $chan /me - Command $2- has been deleted from the database! } } on *:text:!editcom & *:#: { if ($nick isop #) { var %r = $read(commands.txt,ns,$2) if (!%r) { .msg $chan [ $+ $nick $+ ]: Error, This command $qt($2) does NOT exist in the database! | return } write -l $+ $readn commands.txt $2- msg $chan /me -> Command $2 has been updated! } }
Code:
on *:TEXT:!permit*:#: { if ($nick isop #) && ($2) { write reglist.txt $2 msg # $2 has been permitted to post a link for 20 seconds .timerRemovePermit 1 20 RemovePermit # $2 } if ($read(sreglist.txt,nw,$nick)) && ($2) { write reglist.txt $2 msg # $2 has been permitted to post a link for 20 seconds .timerRemovePermit 1 20 RemovePermit # $2 } }
Code:
on *:TEXT:!reg add*:#: { if ($nick isop #) { write reglist.txt $$3 msg $chan $$3 has been added to the regular list! } if ($read(reglist.txt,nw,$nick)) { write reglist.txt $$3 msg $chan $$3 has been added to the regular list! } } on *:TEXT:!reg del*:#: { if ($nick isop #) { if ($read(reglist.txt,nw,$3)) write -dl $+ $readn reglist.txt msg # $$3 has been removed from the regular list! } if ($read(reglist.txt,nw,$nick)) { if ($read(reglist.txt,nw,$3)) write -dl $+ $readn reglist.txt msg # $$3 has been removed from the regular list! } }
I've tried many different scripts but none seem to work and I can't figure out why. I've tried changing the .txt's to .ini's and anything I've had come up in my head. I'd appreciate any help.
Also, since I'm going to have the bot in my friends channels too, how can I make so that there are individual commands for individual channels? Such as multiple !twitter commands?
Thanks.