mirror of
https://github.com/Luzifer/twitch-bot.git
synced 2024-11-10 01:00:05 +00:00
[wiki] Add more and detailed documentation for events
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
a91410d1ce
commit
cde3c62ccd
2 changed files with 126 additions and 2 deletions
124
wiki/Events.md
Normal file
124
wiki/Events.md
Normal file
|
@ -0,0 +1,124 @@
|
|||
# Available Events
|
||||
|
||||
## `category_update`
|
||||
|
||||
The current category for the channel was changed. (This event has some delay to the real category change!)
|
||||
|
||||
Fields:
|
||||
|
||||
- `category` - The name of the new game / category
|
||||
- `channel` - The channel the event occurred in
|
||||
|
||||
## `join`
|
||||
|
||||
User joined the channel-chat. This is **NOT** an indicator they are viewing, the event is **NOT** reliably sent when the user really joined the chat. The event will be sent with some delay after they join the chat and is sometimes repeated multiple times during their stay. So **DO NOT** use this to greet users!
|
||||
|
||||
Fields:
|
||||
|
||||
- `channel` - The channel the event occurred in
|
||||
- `username` - The login-name of the user who joined
|
||||
|
||||
## `part`
|
||||
|
||||
User left the channel-chat. This is **NOT** an indicator they are no longer viewing, the event is **NOT** reliably sent when the user really leaves the chat. The event will be sent with some delay after they leave the chat and is sometimes repeated multiple times during their stay. So this does **NOT** mean they do no longer read the chat!
|
||||
|
||||
Fields:
|
||||
|
||||
- `channel` - The channel the event occurred in
|
||||
- `username` - The login-name of the user who left
|
||||
|
||||
## `permit`
|
||||
|
||||
User received a permit, which means they are no longer affected by rules which are disabled on permit.
|
||||
|
||||
Fields:
|
||||
|
||||
- `channel` - The channel the event occurred in
|
||||
- `username` - The login-name of the user
|
||||
|
||||
## `raid`
|
||||
|
||||
The channel was raided by another user.
|
||||
|
||||
Fields:
|
||||
|
||||
- `channel` - The channel the event occurred in
|
||||
- `username` - The login-name of the user who raided the channel
|
||||
- `viewercount` - The amount of users who have been raided (this number is not fully accurate)
|
||||
|
||||
## `resub`
|
||||
|
||||
The user shared their resubscription. (This event is triggered manually by the user using the "Share my Resub" button and does not occur when the user does not actively share their sub!)
|
||||
|
||||
Fields:
|
||||
|
||||
- `channel` - The channel the event occurred in
|
||||
- `plan` - The sub-plan they are using (`1000` = T1, `2000` = T2, `3000` = T3, `Prime`)
|
||||
- `subscribed_months` - How long have they been subscribed
|
||||
- `username` - The login-name of the user who resubscribed
|
||||
|
||||
## `stream_offline`
|
||||
|
||||
The channels stream went offline. (This event has some delay to the real category change!)
|
||||
|
||||
Fields:
|
||||
|
||||
- `channel` - The channel the event occurred in
|
||||
|
||||
## `stream_online`
|
||||
|
||||
The channels stream went offline. (This event has some delay to the real category change!)
|
||||
|
||||
Fields:
|
||||
|
||||
- `channel` - The channel the event occurred in
|
||||
|
||||
## `sub`
|
||||
|
||||
The user newly subscribed on their own. (This event is triggered automatically and does not need to be shared actively!)
|
||||
|
||||
Fields:
|
||||
|
||||
- `channel` - The channel the event occurred in
|
||||
- `plan` - The sub-plan they are using (`1000` = T1, `2000` = T2, `3000` = T3, `Prime`)
|
||||
- `username` - The login-name of the user who subscribed
|
||||
|
||||
## `subgift`
|
||||
|
||||
The user gifted the subscription to a specific user. (This event **DOES** occur multiple times after `submysterygift` events!)
|
||||
|
||||
Fields:
|
||||
|
||||
- `channel` - The channel the event occurred in
|
||||
- `gifted_months` - Number of months the user gifted
|
||||
- `plan` - The sub-plan they are using (`1000` = T1, `2000` = T2, `3000` = T3, `Prime`)
|
||||
- `to` - The user who received the sub
|
||||
- `username` - The login-name of the user who gifted the subscription
|
||||
|
||||
## `submysterygift`
|
||||
|
||||
The user gifted multiple subs to the community. (This event is followed by `number x subgift` events.)
|
||||
|
||||
Fields:
|
||||
|
||||
- `channel` - The channel the event occurred in
|
||||
- `number` - The amount of gifted subs
|
||||
- `plan` - The sub-plan they are using (`1000` = T1, `2000` = T2, `3000` = T3, `Prime`)
|
||||
- `username` - The login-name of the user who gifted the subscription
|
||||
|
||||
## `title_update`
|
||||
|
||||
The current title for the channel was changed. (This event has some delay to the real category change!)
|
||||
|
||||
Fields:
|
||||
|
||||
- `channel` - The channel the event occurred in
|
||||
- `title` - The title of the stream
|
||||
|
||||
## `whisper`
|
||||
|
||||
The bot received a whisper message. (You can use `(.*)` as message match and `{{ group 1 }}` as template to get the content of the whisper.)
|
||||
|
||||
Fields:
|
||||
|
||||
- `username` - The login-name of the user who sent the message
|
|
@ -106,8 +106,8 @@ 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: category_update, join, host, part, permit, raid, resub,
|
||||
# stream_offline, stream_online, sub, subgift, title_update, whisper
|
||||
# See the Events page in the Wiki for available events and field documentation
|
||||
# https://github.com/Luzifer/twitch-bot/wiki/Events
|
||||
match_event: 'permit'
|
||||
|
||||
# Execute action when the chat message matches this regular expression
|
||||
|
|
Loading…
Reference in a new issue