From 75989747fb71753ed4f4839002e933d5e8aa7da5 Mon Sep 17 00:00:00 2001 From: Tianhao Wang Date: Tue, 4 Apr 2023 09:43:32 +0200 Subject: fix syntax --- cat.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'cat.py') diff --git a/cat.py b/cat.py index 36659ed..86e9af4 100644 --- a/cat.py +++ b/cat.py @@ -52,7 +52,7 @@ class VnilCat: exit() self.intimacy = {} print("[booting] init intimacy") - self.update_intimacy(self) + self.update_intimacy() # try to fetch the lastest status from the timeline # so that we can skip the ones before we start. @@ -69,7 +69,7 @@ class VnilCat: print(f"[booting] Cat booted, all systems green, my name is {self.config.UNAME}, prepare to die, human") print("-------------") - def update_intimacy(): + def update_intimacy(self): res = self.db.count_interaction() if res != None: self.intimacy = res @@ -105,7 +105,7 @@ class VnilCat: def catch_birds(self, status, content): - if re_contains_bird.search(content) is not None and len(content) < 10: + if re_contains_bird.search(content) is not None and len(content) < self.config.CATCH_BIRD_MAX_LENGTH: print("i see a bird", status["id"], " from ", status["account"]["acct"]) try: s = self.session.status_reply( @@ -149,7 +149,6 @@ class VnilCat: # important! make sure to iterate from older status to newer # otherwise the 'last_seen' won't be updated correctly for status in reversed(tl): - # skip if it's from myself self.handle_home_status(status=status) # For now we don't handle other interaction types -- cgit v1.2.3-70-g09d2