From bf0b89e80e7b1ce5c1e42f47abbc828a47756627 Mon Sep 17 00:00:00 2001 From: Swee Date: Wed, 9 Oct 2024 14:52:19 -0700 Subject: [PATCH] Update guild2.py --- guild2.py | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/guild2.py b/guild2.py index 9e4ea7b..ac03519 100644 --- a/guild2.py +++ b/guild2.py @@ -36,15 +36,13 @@ client = guilded.Client() #C.AI caitoken = os.environ["CAItoken"] caibot= os.environ["CAImodel"] -while True: - try: - cai = pycai.Client(caitoken) - me = cai.get_me() - chat = cai.connect() - chats = [] - break - except: - print(traceback.format_exc()) +try: + cai = pycai.Client(caitoken) + me = cai.get_me() + chat = cai.connect() + chats = [] +except: + print(traceback.format_exc()) # Help document documentation = """$help - Shows this message. $ping - Test if bot is online.