Skip to content

Commit

Permalink
Sub message notice
Browse files Browse the repository at this point in the history
  • Loading branch information
thomaserlang committed Nov 2, 2024
1 parent 2f723c3 commit dd7d95e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tbot/twitch_bot/modlog.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,18 @@ async def log_sub(self, data):
)

message = data['sub_message'].get('message')
if message:
await self.redis.publish_json(
f'tbot:live_chat:{data["channel_id"]}',
{
'type': 'notice',
'subtype': 'sub-message',
'provider': 'twitch',
'message': f'{user} sub message: {message}',
'created_at': datetime.now(tz=timezone.utc).isoformat(),
'id': str(uuid4()),
},
)
tiers = {
'1000': 'Tier 1 Sub',
'2000': 'Tier 2 Sub',
Expand Down

0 comments on commit dd7d95e

Please sign in to comment.