I need to build to create a MIRC TWITCH command

I am setting up a bot for a channel in the twitch and I have the following doubt:
How can I record all the bans that were given in a channel in a txt file.
Example: When a person is banned /ban nick the bot will automatically save the nick that was banned in a txt.
Have you tried using twitchnotify but could not get anyone to know the command line?

I am setting up a bot for a channel in the twitch and I have the following doubt:

Ok


How can I record all the bans that were given in a channel in a txt file.

With a ‘remote script’.


Example: When a person is banned /ban nick the bot will automatically save the nick that was banned in a txt.

Example script:

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

raw *:*: {
  if $nick == tmi.twitch.tv {
    if CLEARCHAT isin $rawmsg {
      tokenize 32 $rawmsg
      var %chan = $3
      var %user = $remove($4, $chr(58))
      var %chanid = $msgtags(room-id).key
      var %userid = $msgtags(target-user-id).key
      var %reason = $msgtags(ban-reason).key
      if %user != $null {
        write bans.txt %chan ( $+ %chanid $+ ) ** %user ( $+ %userid $+ ) has been timed out. - %reason **
      }
    }
    else { $null }
  }
}

Have you tried using twitchnotify but could not get anyone to know the command line?

What?

Thank you. :smiley:

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