From 242b85f0e82acb37d9b070f13bb2905b31dc4d01 Mon Sep 17 00:00:00 2001 From: Dustin Date: Fri, 23 Aug 2024 14:55:12 -0400 Subject: [PATCH] bug fixes --- ollamarama.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ollamarama.py b/ollamarama.py index 3d5d336..a3ad762 100644 --- a/ollamarama.py +++ b/ollamarama.py @@ -126,7 +126,7 @@ class ollamarama: async def set_prompt(self, channel, sender, persona=None, custom=None, respond=True): #clear existing history try: - await self.messages[channel][sender].clear() + self.messages[channel][sender].clear() except: pass if persona != None: @@ -244,7 +244,10 @@ class ollamarama: #check if the message was sent after joining and not by the bot if message_time > self.join_time and sender != self.username: - await self.handle_message(message, sender, sender_display, channel) + try: + await self.handle_message(message, sender, sender_display, channel) + except: + pass async def main(self): # Login, print "Logged in as @alice:example.org device id: RANDOMDID"