mIRC Home    About    Download    Register    News    Help

Print Thread
Twitch Bot Consecutive Commands help #252644 01/05/15 05:14 AM
Joined: May 2015
Posts: 9
S
Slashir11 Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
S
Joined: May 2015
Posts: 9
So I've built a Twitch bot that works well, but one problem I've encountered is whenever 2 people use a command twice in a row, the second time the bot doesn't display the second command because Twitch prohibits identical messages so close to each other. Is there a simple way to work around this small issue?

Example command:
Code:
on *:TEXT:!isbotworking:#: {
  if ((%floodisbotworking) || ($($+(%,floodisbotworking.,$nick),2))) { return }
  set -u10 %floodisbotworking On
  set -u30 %floodisbotworking. $+ $nick On
  msg $chan Yes, GLBBot is currently up and running.


Any help would be great.
~Slashir11

Last edited by Slashir11; 01/05/15 05:34 AM.
Re: Twitch Bot Consecutive Commands help [Re: Slashir11] #252645 01/05/15 06:45 AM
Joined: Jan 2015
Posts: 40
J
jimieo Offline
Ameglian cow
Offline
Ameglian cow
J
Joined: Jan 2015
Posts: 40
Your own code prohibits the duplicate message.
set -u10 %floodisbotworking On

You have it set to only be usable once every 10 seconds (or once every 30 seconds for the same user). Remove that line if you really want it to be usable so quickly.

Re: Twitch Bot Consecutive Commands help [Re: Slashir11] #252646 01/05/15 07:33 AM
Joined: Jun 2014
Posts: 248
B
Belhifet Offline
Fjord artisan
Offline
Fjord artisan
B
Joined: Jun 2014
Posts: 248
Its worth noting, that without spam protection or a command queue a malicious user could intentionally cause you to be globally banned from twitch.

Re: Twitch Bot Consecutive Commands help [Re: Slashir11] #252648 01/05/15 07:26 PM
Joined: Apr 2010
Posts: 959
F
FroggieDaFrog Offline
Hoopy frood
Offline
Hoopy frood
F
Joined: Apr 2010
Posts: 959
For commands that respond to a user, I prefix the message with their nick:

Example:
Code:
msg $chan $nick $+ , GLBot is currently up and running.
; <someuser> !isbotworking
; <bot> someuser, GLBot is currently up and running.


Last edited by FroggieDaFrog; 01/05/15 07:27 PM.

I am SReject
My Stuff