mIRC Homepage
Posted By: Slashir11 Twitch Bot Consecutive Commands help - 01/05/15 05:14 AM
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
Posted By: jimieo Re: Twitch Bot Consecutive Commands help - 01/05/15 06:45 AM
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.
Posted By: Belhifet Re: Twitch Bot Consecutive Commands help - 01/05/15 07:33 AM
Its worth noting, that without spam protection or a command queue a malicious user could intentionally cause you to be globally banned from twitch.
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.

© mIRC Discussion Forums