What sort of bot is it? mIRC script? Perl? Python? PHP?
You could do an API check for the moderators section via: http://tmi.twitch.tv/group/user/example/chatters
If you are using an mIRC script something like this example would do the job:
Before you join any channels, run:
/raw CAP REQ :twitch.tv/membership
Then have a remote script for:
ON *:TEXT:!welcome:#mystream: {
if ($me isop $chan) {
if ($nick isop $chan) {
if (%flood) { return }
set -u10 %flood On
msg #mystream Welcome to the channel }
} }
What this does, is it watches the channel “MyStream” for the “!welcome” command, once it finds it, it checks if you are “Op” aka Moderator in that channel, and it checks if the person trying to do the command is a Moderator also… if both are try it checks if the variable %flood exists. If it does, it halts and goes back to checking for triggers. If there was no %flood variable then it set’s it for 10 seconds counting down to a 0 (self destruct).
This will effectively prevent this command from going off again for 10 seconds. Making all your commands use the same variable will prevent any of them from triggering.
If you wanted the command to work for any user and not just moderators you could do
ON *:TEXT:!welcome:#mystream: {
if ($me isop $chan) {
if (%flood) { return }
set -u10 %flood On
msg #mystream Welcome to the channel }
}