mirror of
https://github.com/Luzifer/twitch-bot.git
synced 2024-12-20 20:01:17 +00:00
[core] Provide message in announcement
, bits
and resub
events
for overlays to react on them Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
c51a0751f0
commit
f674735689
1 changed files with 4 additions and 1 deletions
3
irc.go
3
irc.go
|
@ -376,6 +376,7 @@ func (i ircHandler) handleTwitchPrivmsg(m *irc.Message) {
|
||||||
fields := plugins.FieldCollectionFromData(map[string]interface{}{
|
fields := plugins.FieldCollectionFromData(map[string]interface{}{
|
||||||
"bits": bits,
|
"bits": bits,
|
||||||
"channel": i.getChannel(m), // Compatibility to plugins.DeriveChannel
|
"channel": i.getChannel(m), // Compatibility to plugins.DeriveChannel
|
||||||
|
"message": m.Trailing(),
|
||||||
"user": m.User, // Compatibility to plugins.DeriveUser
|
"user": m.User, // Compatibility to plugins.DeriveUser
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -403,6 +404,7 @@ func (i ircHandler) handleTwitchUsernotice(m *irc.Message) {
|
||||||
evtData := plugins.FieldCollectionFromData(map[string]any{
|
evtData := plugins.FieldCollectionFromData(map[string]any{
|
||||||
"channel": i.getChannel(m), // Compatibility to plugins.DeriveChannel
|
"channel": i.getChannel(m), // Compatibility to plugins.DeriveChannel
|
||||||
"color": m.Tags["msg-param-color"],
|
"color": m.Tags["msg-param-color"],
|
||||||
|
"message": m.Trailing(),
|
||||||
"user": m.Tags["login"], // Compatibility to plugins.DeriveUser
|
"user": m.Tags["login"], // Compatibility to plugins.DeriveUser
|
||||||
})
|
})
|
||||||
log.WithFields(log.Fields(evtData.Data())).Info("Announcement was made")
|
log.WithFields(log.Fields(evtData.Data())).Info("Announcement was made")
|
||||||
|
@ -435,6 +437,7 @@ func (i ircHandler) handleTwitchUsernotice(m *irc.Message) {
|
||||||
evtData := plugins.FieldCollectionFromData(map[string]interface{}{
|
evtData := plugins.FieldCollectionFromData(map[string]interface{}{
|
||||||
"channel": i.getChannel(m), // Compatibility to plugins.DeriveChannel
|
"channel": i.getChannel(m), // Compatibility to plugins.DeriveChannel
|
||||||
"from": m.Tags["login"],
|
"from": m.Tags["login"],
|
||||||
|
"message": m.Trailing(),
|
||||||
"subscribed_months": m.Tags["msg-param-cumulative-months"],
|
"subscribed_months": m.Tags["msg-param-cumulative-months"],
|
||||||
"plan": m.Tags["msg-param-sub-plan"],
|
"plan": m.Tags["msg-param-sub-plan"],
|
||||||
"user": m.Tags["login"], // Compatibility to plugins.DeriveUser
|
"user": m.Tags["login"], // Compatibility to plugins.DeriveUser
|
||||||
|
|
Loading…
Reference in a new issue