Skip to content
JR edited this page May 21, 2019 · 16 revisions

Connecting

To connect to Twitch servers you must supply an OAuth token pass. Generate one here, then add it to your kameloso.conf in the pass field.

[IRCBot]
nickname            twitchaccount
pass                oauth:the50letteroauthstringgoeshere
homes               #twitchaccount
channels            #streamer1,#streamer2,#streamer3

[IRCServer]
address             irc.chat.twitch.tv
port                6667

pass is not the same as password. It is supplied very early during login (or registration) to allow you to connect -- even before negotiating username and nickname, which is otherwise the very first thing to happen. password is something that is sent to a services bot (like NickServ or AuthServ) after registration has finished and you have successfully logged onto the server. (Only in the case of SASL authentication is password used during registration.)

Mind that in many ways Twitch does not behave as a full IRC server. Most common IRC commands go unrecognised. Joins and parts are not always advertised. Participants in a channel are not always enumerated upon joining one, and you cannot query the server for the list. You cannot ask the server for information about a single user either. You cannot readily trust who is +o and who isn't, as it will oscillate to -o at irregular intervals. You can also only join channels for which a corresponding Twitch user account exists.

See this Twitch help page on moderation and this page on harassment for available moderator commands to send as normal channel PRIVMSG messages.

Note: a dot . prefix will not work on Twitch, as it conflicts with Twitch's own commands.

Twitch bot

There is a basic streamer bot plugin but it is opt-in, both during compilation and at runtime. Build the twitch configuration to compile it, and enable it in the configuration file under the [TwitchBot] section. If the section doesn't exist, regenerate the file after having compiled with the bot included. (It will not show up when generating the file if the plugin is not compiled in.)

Much but not all of the bot can be used on Twitch servers. Notably there is no point having the Automodes plugin enabled, as modes are not really set in such a way there.

Example use

Streamer123 joined #streamer123

Streamer123 | !uptime
   kameloso | Streamer123 is currently not streaming.
Streamer123 | !start
   kameloso | Broadcast start registered!
Streamer123 | !uptime
   kameloso | Streamer123 has been streaming for 32 minutes and 13 secs.
Streamer123 | !stop
   kameloso | Broadcast ended. Streamer123 streamed for 1 hour, 42 minutes and 33 secs.
Streamer123 | !uptime
   kameloso | Streamer123 is currently not streaming.

Streamer123 | !admin list
   kameloso | Current administrators: John, Doe, outOfFavour
Streame123  | !admin add NiceGuy
   kameloso | NiceGuy is now an administrator.
Streamer123 | !admin del outOfFavour
   kameloso | Administrator removed.

Streamer123 | !commands
   kameloso | There are no commands available right now.
Streamer123 | !oneliner add asdf I thought what I'd do was, I'd pretend I was one of those deaf-mutes.
   kameloso | Oneliner !asdf added.
Streamer123 | !oneliner add youtube Check out the replays on YouTube! https://www.youtube.com/user/Streamer123
   kameloso | Oneliner !youtube added.
Streamer123 | !oneliner add vods https://twitch.tv/Streamer123/videos
   kameloso | Oneliner !vods added.
Streamer123 | !oneliner add github Build your own kameloso! See https://github.com/zorael/kameloso
   kameloso | Oneliner !github added.
Streamer123 | !youtube
   kameloso | Check out the replays on YouTube! https://www.youtube.com/user/Streamer123
Streamer123 | !vods
   kameloso | https://twitch.tv/Streamer123/videos
Streamer123 | !github
   kameloso | Build your own kameloso! See https://github.com/zorael/kameloso

Streamer123 | !commands
   kameloso | Available commands: !asdf, !github, !vods, !youtube
Streamer123 | !oneliner del vods
   kameloso | Oneliner !vods removed.
Streamer123 | !oneliner del github
   kameloso | Oneliner !github removed.
Streamer123 | !vods
Streamer123 | !github
Streamer123 | !commands
   kameloso | Available commands: !asdf, !youtube

Streamer123 | !vote 60 snik snek
   kameloso | Voting commenced! Please place your vote for one of: snik, snek (60 seconds)
        Bob | snik
      Alice | snek
        Eve | snek
   kameloso | Voting complete, results:
   kameloso | snik : 1 vote (33.3%)
   kameloso | snek : 2 votes (66.6%)

Streamer123 | !disable
   kameloso | Streamer bot disabled.
Streamer123 | !commands
Streamer123 | !asdf
Streamer123 | !uptime
Streamer123 | !enable
   kameloso | Streamer bot enabled!
Streamer123 | !uptime
   kameloso | Streamer123 is currently not streaming.

Streamer123 | !phrase ban I thought what I'd do was, I'd pretend I was one of those deaf-mutes
   kameloso | New phrase ban added.
Streamer123 | !phrase ban LUL LUL LUL
   kameloso | New phrase ban added.
        Bob | LUL LUL LUL
-- message has been deleted, reason: Banned phrase --
        Bob | <timed out, 60 seconds>
Streamer123 | !phrase list
   kameloso | Currently banned phrases (1-2 of 2)
   kameloso | 1: I thought what I'd do was, I'd pretend I was one of those deaf-mutes
   kameloso | 2: LUL LUL LUL
Streamer123 | !phrase unban 2
   kameloso | 1/2 phrase bans removed.

Feedback and ideas welcome.

You can’t perform that action at this time.