mirror of
https://github.com/Luzifer/twitch-bot.git
synced 2024-11-08 16:20:02 +00:00
Add sub events, document available event types
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
5941b50202
commit
df31769142
4 changed files with 15 additions and 5 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,3 +1,4 @@
|
|||
config
|
||||
config.yaml
|
||||
.env
|
||||
storage.json.gz
|
||||
|
|
|
@ -8,4 +8,6 @@ var (
|
|||
eventTypePermit = ptrStr("permit")
|
||||
eventTypeRaid = ptrStr("raid")
|
||||
eventTypeResub = ptrStr("resub")
|
||||
eventTypeSub = ptrStr("sub")
|
||||
eventTypeSubgift = ptrStr("subgift")
|
||||
)
|
||||
|
|
6
irc.go
6
irc.go
|
@ -229,6 +229,12 @@ func (i ircHandler) handleTwitchUsernotice(m *irc.Message) {
|
|||
case "resub":
|
||||
go handleMessage(i.c, m, eventTypeResub)
|
||||
|
||||
case "sub":
|
||||
go handleMessage(i.c, m, eventTypeSub)
|
||||
|
||||
case "subgift", "anonsubgift":
|
||||
go handleMessage(i.c, m, eventTypeSubgift)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -76,6 +76,7 @@ rules: # See below for examples
|
|||
match_users: ['mychannel'] # List of users, all names MUST be all lower-case
|
||||
|
||||
# Execute actions when this event occurs
|
||||
# Available events: join, host, permit, raid, resub, sub, subgift
|
||||
match_event: 'permit'
|
||||
|
||||
# Execute action when the chat message matches this regular expression
|
||||
|
|
Loading…
Reference in a new issue