diff options
| -rw-r--r-- | cat.py | 7 | ||||
| -rw-r--r-- | config.py | 6 |
2 files changed, 9 insertions, 4 deletions
@@ -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 @@ -28,7 +28,13 @@ except: ADMINS = ["shrik3"] +# INTIMACY THREHOLDS +INTIMACY_FRIENDLY = 10 +INTIMACY_ACTIVE = 50 +INTIMACY_LOVE = 100 +# BEHAVIOURS .. +CATCH_BIRD_MAX_LENGTH = 30 ## DB CONFIGS ----------------------------- # TODO, currently the bot and the db handler is sharing |
