feat(eventsub): add automod.message.* and channel.suspicious_user.* (#6003)
This commit is contained in:
@@ -0,0 +1,71 @@
|
||||
{
|
||||
"metadata": {
|
||||
"message_id": "e6095757-c068-4a97-b6b4-46cb45c8d507",
|
||||
"message_type": "notification",
|
||||
"message_timestamp": "2023-05-14T12:31:47.995298776Z",
|
||||
"subscription_type": "automod.message.hold",
|
||||
"subscription_version": "2"
|
||||
},
|
||||
"payload": {
|
||||
"subscription": {
|
||||
"id": "f1c2a387-161a-49f9-a165-0f21d7a4e1c4",
|
||||
"type": "automod.message.hold",
|
||||
"version": "2",
|
||||
"status": "enabled",
|
||||
"cost": 0,
|
||||
"condition": {
|
||||
"broadcaster_user_id": "1337",
|
||||
"moderator_user_id": "9001"
|
||||
},
|
||||
"transport": { "method": "websocket", "session_id": "38de428e_b11f07be" },
|
||||
"created_at": "2023-04-11T10:11:12.123Z"
|
||||
},
|
||||
"event": {
|
||||
"broadcaster_user_id": "1337",
|
||||
"broadcaster_user_login": "blah",
|
||||
"broadcaster_user_name": "blahblah",
|
||||
"user_id": "4242",
|
||||
"user_login": "baduser",
|
||||
"user_name": "badbaduser",
|
||||
"message_id": "bad-message-id",
|
||||
"message": {
|
||||
"text": "This is a bad message… pogchamp",
|
||||
"fragments": [
|
||||
{
|
||||
"type": "text",
|
||||
"text": "This is a bad message… ",
|
||||
"cheermote": null,
|
||||
"emote": null
|
||||
},
|
||||
{
|
||||
"type": "cheermote",
|
||||
"text": "pogchamp",
|
||||
"cheermote": {
|
||||
"prefix": "pogchamp",
|
||||
"bits": 1000,
|
||||
"tier": 1
|
||||
},
|
||||
"emote": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"reason": "automod",
|
||||
"automod": {
|
||||
"category": "aggressive",
|
||||
"level": 1,
|
||||
"boundaries": [
|
||||
{
|
||||
"start_pos": 0,
|
||||
"end_pos": 10
|
||||
},
|
||||
{
|
||||
"start_pos": 20,
|
||||
"end_pos": 30
|
||||
}
|
||||
]
|
||||
},
|
||||
"blocked_term": null,
|
||||
"held_at": "2022-12-02T15:00:00.00Z"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
{
|
||||
"metadata": {
|
||||
"message_id": "e6095757-c068-4a97-b6b4-46cb45c8d507",
|
||||
"message_type": "notification",
|
||||
"message_timestamp": "2023-05-14T12:31:47.995298776Z",
|
||||
"subscription_type": "automod.message.update",
|
||||
"subscription_version": "2"
|
||||
},
|
||||
"payload": {
|
||||
"subscription": {
|
||||
"id": "f1c2a387-161a-49f9-a165-0f21d7a4e1c4",
|
||||
"type": "automod.message.update",
|
||||
"version": "2",
|
||||
"status": "enabled",
|
||||
"cost": 0,
|
||||
"condition": {
|
||||
"broadcaster_user_id": "1337",
|
||||
"moderator_user_id": "9001"
|
||||
},
|
||||
"transport": { "method": "websocket", "session_id": "38de428e_b11f07be" },
|
||||
"created_at": "2023-04-11T10:11:12.123Z"
|
||||
},
|
||||
"event": {
|
||||
"broadcaster_user_id": "1337",
|
||||
"broadcaster_user_login": "blah",
|
||||
"broadcaster_user_name": "blahblah",
|
||||
"moderator_user_id": "9001",
|
||||
"moderator_user_login": "the_mod",
|
||||
"moderator_user_name": "The_Mod",
|
||||
"user_id": "4242",
|
||||
"user_login": "baduser",
|
||||
"user_name": "badbaduser",
|
||||
"message_id": "bad-message-id",
|
||||
"message": {
|
||||
"text": "This is a bad message… pogchamp",
|
||||
"fragments": [
|
||||
{
|
||||
"type": "text",
|
||||
"text": "This is a bad message… ",
|
||||
"cheermote": null,
|
||||
"emote": null
|
||||
},
|
||||
{
|
||||
"type": "cheermote",
|
||||
"text": "pogchamp",
|
||||
"cheermote": {
|
||||
"prefix": "pogchamp",
|
||||
"bits": 1000,
|
||||
"tier": 1
|
||||
},
|
||||
"emote": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"reason": "blocked_term",
|
||||
"automod": null,
|
||||
"blocked_term": {
|
||||
"terms_found": [
|
||||
{
|
||||
"term_id": "123",
|
||||
"owner_broadcaster_user_id": "1337",
|
||||
"owner_broadcaster_user_login": "blah",
|
||||
"owner_broadcaster_user_name": "blahblah",
|
||||
"boundary": {
|
||||
"start_pos": 0,
|
||||
"end_pos": 30
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"status": "approved",
|
||||
"held_at": "2022-12-02T15:00:00.00Z"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
{
|
||||
"metadata": {
|
||||
"message_id": "bf6e248f-a523-4bf8-b215-ea1822e60223",
|
||||
"message_type": "notification",
|
||||
"message_timestamp": "2024-05-14T12:31:47.995298776Z",
|
||||
"subscription_type": "channel.suspicious_user.message",
|
||||
"subscription_version": "1"
|
||||
},
|
||||
"payload": {
|
||||
"subscription": {
|
||||
"id": "f1c2a387-161a-49f9-a165-0f21d7a4e1c4",
|
||||
"type": "channel.suspicious_user.message",
|
||||
"version": "1",
|
||||
"status": "enabled",
|
||||
"cost": 0,
|
||||
"condition": {
|
||||
"moderator_user_id": "9001",
|
||||
"broadcaster_user_id": "1050263432"
|
||||
},
|
||||
"transport": { "method": "websocket", "session_id": "38de428e_b11f07be" },
|
||||
"created_at": "2023-04-11T10:11:12.123Z"
|
||||
},
|
||||
"event": {
|
||||
"broadcaster_user_id": "1050263432",
|
||||
"broadcaster_user_name": "dcf9dd9336034d23b65",
|
||||
"broadcaster_user_login": "dcf9dd9336034d23b65",
|
||||
"user_id": "1050263434",
|
||||
"user_name": "4a46e2cf2e2f4d6a9e6",
|
||||
"user_login": "4a46e2cf2e2f4d6a9e6",
|
||||
"low_trust_status": "active_monitoring",
|
||||
"shared_ban_channel_ids": ["100", "200"],
|
||||
"types": ["ban_evader"],
|
||||
"ban_evasion_evaluation": "likely",
|
||||
"message": {
|
||||
"message_id": "101010",
|
||||
"text": "bad stuff pogchamp",
|
||||
"fragments": [
|
||||
{
|
||||
"type": "emote",
|
||||
"text": "bad stuff",
|
||||
"cheermote": null,
|
||||
"emote": {
|
||||
"id": "899",
|
||||
"emote_set_id": "1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "cheermote",
|
||||
"text": "pogchamp",
|
||||
"cheermote": {
|
||||
"prefix": "pogchamp",
|
||||
"bits": 100,
|
||||
"tier": 1
|
||||
},
|
||||
"emote": null
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"metadata": {
|
||||
"message_id": "bf6e248f-a523-4bf8-b215-ea1822e60223",
|
||||
"message_type": "notification",
|
||||
"message_timestamp": "2024-05-14T12:31:47.995298776Z",
|
||||
"subscription_type": "channel.suspicious_user.update",
|
||||
"subscription_version": "1"
|
||||
},
|
||||
"payload": {
|
||||
"subscription": {
|
||||
"id": "f1c2a387-161a-49f9-a165-0f21d7a4e1c4",
|
||||
"type": "channel.suspicious_user.update",
|
||||
"version": "1",
|
||||
"status": "enabled",
|
||||
"cost": 0,
|
||||
"condition": {
|
||||
"broadcaster_user_id": "1050263435",
|
||||
"moderator_user_id": "1050263436"
|
||||
},
|
||||
"transport": { "method": "websocket", "session_id": "38de428e_b11f07be" },
|
||||
"created_at": "2023-04-11T10:11:12.123Z"
|
||||
},
|
||||
"event": {
|
||||
"broadcaster_user_id": "1050263435",
|
||||
"broadcaster_user_name": "77f111cbb75341449f5",
|
||||
"broadcaster_user_login": "77f111cbb75341449f5",
|
||||
"moderator_user_id": "1050263436",
|
||||
"moderator_user_name": "29087e59dfc441968f6",
|
||||
"moderator_user_login": "29087e59dfc441968f6",
|
||||
"user_id": "1050263437",
|
||||
"user_name": "06fbcc75952245c5a87",
|
||||
"user_login": "06fbcc75952245c5a87",
|
||||
"low_trust_status": "restricted"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -106,6 +106,29 @@ class NoOpListener : public chatterino::eventsub::lib::Listener
|
||||
const payload::channel_moderate::v2::Payload &payload) override
|
||||
{
|
||||
}
|
||||
|
||||
void onAutomodMessageHold(
|
||||
const messages::Metadata &metadata,
|
||||
const payload::automod_message_hold::v2::Payload &payload) override
|
||||
{
|
||||
}
|
||||
void onAutomodMessageUpdate(
|
||||
const messages::Metadata &metadata,
|
||||
const payload::automod_message_update::v2::Payload &payload) override
|
||||
{
|
||||
}
|
||||
void onChannelSuspiciousUserMessage(
|
||||
const messages::Metadata &metadata,
|
||||
const payload::channel_suspicious_user_message::v1::Payload &payload)
|
||||
override
|
||||
{
|
||||
}
|
||||
void onChannelSuspiciousUserUpdate(
|
||||
const messages::Metadata &metadata,
|
||||
const payload::channel_suspicious_user_update::v1::Payload &payload)
|
||||
override
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user