mirror of
https://github.com/Luzifer/twitch-bot.git
synced 2024-11-09 08:40:01 +00:00
[core] Remove support for hype_chat
event
This reverts commit 0b8196b127
.
This commit is contained in:
parent
4a05a8a7f2
commit
6826f507f6
3 changed files with 0 additions and 35 deletions
|
@ -91,21 +91,6 @@ Fields:
|
||||||
- `gifter` - The login-name of the user who gifted the subscription
|
- `gifter` - The login-name of the user who gifted the subscription
|
||||||
- `username` - The login-name of the user who upgraded their subscription
|
- `username` - The login-name of the user who upgraded their subscription
|
||||||
|
|
||||||
## `hype_chat`
|
|
||||||
|
|
||||||
User used the Twitch "Hype Chat" to pin a message to the chat.
|
|
||||||
|
|
||||||
Fields:
|
|
||||||
|
|
||||||
- `amount` - Amount of money the user spent (float64, i.e. `1.2` when they used 1.20 EUR)
|
|
||||||
- `channel` - The channel the event occurred in
|
|
||||||
- `currency` - [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes) alphabetic currency code
|
|
||||||
- `is_system_message` - Set to `true` if the user left no message and the message was system-generated
|
|
||||||
- `level` - `ONE` to `TEN`, uppercase number-words
|
|
||||||
- `messge` - The message the user sent (or the system generated)
|
|
||||||
- `user_id` - ID of the user
|
|
||||||
- `user` - The login-name of the user who sent the message
|
|
||||||
|
|
||||||
## `join`
|
## `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!
|
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!
|
||||||
|
|
|
@ -26,7 +26,6 @@ var (
|
||||||
eventTypeDelete = ptrStr("delete")
|
eventTypeDelete = ptrStr("delete")
|
||||||
eventTypeFollow = ptrStr("follow")
|
eventTypeFollow = ptrStr("follow")
|
||||||
eventTypeGiftPaidUpgrade = ptrStr("giftpaidupgrade")
|
eventTypeGiftPaidUpgrade = ptrStr("giftpaidupgrade")
|
||||||
eventTypeHypeChat = ptrStr("hype_chat")
|
|
||||||
eventTypeJoin = ptrStr("join")
|
eventTypeJoin = ptrStr("join")
|
||||||
eventTypeOutboundRaid = ptrStr("outbound_raid")
|
eventTypeOutboundRaid = ptrStr("outbound_raid")
|
||||||
eventTypePart = ptrStr("part")
|
eventTypePart = ptrStr("part")
|
||||||
|
@ -61,7 +60,6 @@ var (
|
||||||
eventTypeDelete,
|
eventTypeDelete,
|
||||||
eventTypeFollow,
|
eventTypeFollow,
|
||||||
eventTypeGiftPaidUpgrade,
|
eventTypeGiftPaidUpgrade,
|
||||||
eventTypeHypeChat,
|
|
||||||
eventTypeJoin,
|
eventTypeJoin,
|
||||||
eventTypeOutboundRaid,
|
eventTypeOutboundRaid,
|
||||||
eventTypePart,
|
eventTypePart,
|
||||||
|
|
18
irc.go
18
irc.go
|
@ -4,7 +4,6 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"crypto/tls"
|
"crypto/tls"
|
||||||
"fmt"
|
"fmt"
|
||||||
"math"
|
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
|
@ -370,23 +369,6 @@ func (i ircHandler) handleTwitchPrivmsg(m *irc.Message) {
|
||||||
go handleMessage(i.c, m, eventTypeBits, fields)
|
go handleMessage(i.c, m, eventTypeBits, fields)
|
||||||
}
|
}
|
||||||
|
|
||||||
if amount := i.tagToNumeric(m, "pinned-chat-paid-amount", 0); amount > 0 {
|
|
||||||
fields := plugins.FieldCollectionFromData(map[string]any{
|
|
||||||
"amount": float64(amount) / math.Pow10(int(i.tagToNumeric(m, "pinned-chat-paid-exponent", 0))),
|
|
||||||
"currency": m.Tags["pinned-chat-paid-currency"],
|
|
||||||
eventFieldChannel: i.getChannel(m),
|
|
||||||
eventFieldUserID: m.Tags["user-id"],
|
|
||||||
eventFieldUserName: m.User,
|
|
||||||
"is_system_message": m.Tags["pinned-chat-paid-is-system-message"] == "1",
|
|
||||||
"level": m.Tags["pinned-chat-paid-level"],
|
|
||||||
"message": m.Trailing(),
|
|
||||||
})
|
|
||||||
|
|
||||||
logrus.WithFields(logrus.Fields(fields.Data())).Info("User used hype-chat message")
|
|
||||||
|
|
||||||
go handleMessage(i.c, m, eventTypeHypeChat, fields)
|
|
||||||
}
|
|
||||||
|
|
||||||
go handleMessage(i.c, m, nil, nil)
|
go handleMessage(i.c, m, nil, nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue