!join command for an IRC bot


Hey guys I was wanting to to have a bot Idle in its chat and on an !join it sees the $nick for that user and joins there channel automatically if this has been done before just point me in the direction I also was wanting to add an !leave function so that when the Streamer goes offline they or one of the mods can tell the bot to leave so that people that just sit in the chat do not earn the Currency for sitting there. I am using mIRC for coding to integrate it into twitch.


ON *:TEXT:!join:#: {
if (%flood) { return }
set -u3 %flood Stop
join $chr(35) $+ $nick
msg # ACTION joined $nick $+ 's chat
ON *:TEXT:!leave:#: {
if (%flood) { return }
if ($msgtags(mod).key == 1) {
set -u3 %flood Stop
part $chan
msg # ACTION left $remove($chan,#) $+ 's chat

I suppose that would do it if you have:

CAP REQ :twitch.tv/membership
CAP REQ :twitch.tv/commands

Also prevents people from flooding you with join/parts.


Just for my sake what is the Difference between $msgtags(mod).key == 1 and $nick isop # or do both do the same thing? And I have the membership but not the commands. I will add that in.


nick isop # will work only if the nicklist is populated. It usually works fine but I have had issues in the past with the list not populating 100% of the time. I’ve never had an issue with the message tags. I suppose it’s just my preference.

closed #5

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.