summaryrefslogtreecommitdiff
path: root/cat.py
diff options
context:
space:
mode:
authorTianhao Wang <shrik3@riseup.net>2023-04-04 09:43:32 +0200
committerTianhao Wang <shrik3@riseup.net>2023-04-04 09:43:32 +0200
commit75989747fb71753ed4f4839002e933d5e8aa7da5 (patch)
tree9995fd2740b35720c3ac77dcf452a7f5905ee1c6 /cat.py
parent917954ecf051198ca3916db4173503514642550a (diff)
fix syntax
Diffstat (limited to 'cat.py')
-rw-r--r--cat.py7
1 files changed, 3 insertions, 4 deletions
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