From 4349b281235270f9ae1e2181ea278aa8efb5d6e7 Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Wed, 28 Jun 2023 02:48:12 +0100 Subject: [PATCH] msg renamed to data --- __main__.py | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/__main__.py b/__main__.py index b1e7786..d2eca1c 100644 --- a/__main__.py +++ b/__main__.py @@ -1,21 +1,19 @@ -import logging - import streamlabsio -logging.basicConfig(level=logging.INFO) + +def on_youtube_event(event, data): + print(f"{event}: {data.attrs()}") -def on_youtube_event(event, msg): - print(f"{event}: {msg.attrs()}") - - -def on_twitch_event(event, msg): +def on_twitch_event(event, data): if event == "follow": - print(f"Received follow from {msg.name}") + print(f"Received follow from {data.name}") elif event == "bits": - print(f"{msg.name} donated {msg.amount} bits! With message: {msg.message}") + print(f"{data.name} donated {data.amount} bits! With message: {data.message}") elif event == "donation": - print(f"{msg.name} donated {msg.formatted_amount}! With message: {msg.message}") + print( + f"{data.name} donated {data.formatted_amount}! With message: {data.message}" + ) def main():