From ecd45f1d04e2bb618ddc804d936638b445f001c7 Mon Sep 17 00:00:00 2001 From: cynic Date: Tue, 2 Aug 2022 23:53:55 -0400 Subject: [PATCH] oopsie (ENTERPRISE QUALITY) --- main.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index 5c51dde..642c76d 100644 --- a/main.py +++ b/main.py @@ -50,9 +50,8 @@ class bird_inst(): while True: data = json.loads(await self.ws.recv()) print(">>>", data) - getattr(self, "handle_"+data["type"], None)(data) - #try: getattr(self, "handle_"+data["type"], None)(data) - #except Exception as e: print("hey buddy your shits fucked thought you might want to know", e) + try: getattr(self, "handle_"+data["type"], None)(data) + except Exception as e: print("hey buddy your shits fucked thought you might want to know", e) def handle_message(self, ctx): print("btw i just got this", ctx["data"]["message"]["text"]) ctx["data"]["message"]["text"] = html.unescape(ctx["data"]["message"]["text"])