From f8f923bfb46d86140df90a146b542e2899d0406e Mon Sep 17 00:00:00 2001 From: Bulat Kurbanov Date: Tue, 18 Feb 2025 20:40:03 +0100 Subject: [PATCH] Update --- src/modules/stream_notifications/messages_proc.py | 15 +++++++++++++-- .../stream_notifications/twitch/authorize.py | 5 +++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/modules/stream_notifications/messages_proc.py b/src/modules/stream_notifications/messages_proc.py index 9e07f61..d250af5 100644 --- a/src/modules/stream_notifications/messages_proc.py +++ b/src/modules/stream_notifications/messages_proc.py @@ -96,11 +96,22 @@ class MessagesProc: async def on_message(cls, event: MessageEvent): logging.info(f"Received message: {event}") - if event.message.text == "!hello": + if "kurbezz" in event.message.text.lower() or \ + "курбез" in event.message.text.lower() or \ + "булат" in event.message.text.lower(): twitch = await authorize() await twitch.send_chat_message( event.broadcaster_user_id, config.TWITCH_ADMIN_USER_ID, - "Hello, world!" + "Пошел нахуй!" + ) + + if "гойда" in event.message.text.lower(): + twitch = await authorize() + + await twitch.send_chat_message( + event.broadcaster_user_id, + config.TWITCH_ADMIN_USER_ID, + "ГООООООООООООООООООООООООООООООООООООООЙДА!" ) diff --git a/src/modules/stream_notifications/twitch/authorize.py b/src/modules/stream_notifications/twitch/authorize.py index c66e729..29fca71 100644 --- a/src/modules/stream_notifications/twitch/authorize.py +++ b/src/modules/stream_notifications/twitch/authorize.py @@ -7,9 +7,10 @@ from .token_storage import TokenStorage SCOPES = [ - AuthScope.CHAT_READ - , + AuthScope.CHAT_READ, + AuthScope.CHANNEL_BOT, + AuthScope.CHANNEL_SUBSCRIPTIONS, AuthScope.USER_BOT, AuthScope.USER_READ_CHAT,