From ea0b22b5ecce8a9891dc4f53a474093a9a2da7e3 Mon Sep 17 00:00:00 2001 From: float-trip Date: Mon, 10 Jul 2023 00:21:01 +0000 Subject: [PATCH] Use is_bot rather than a hardcoded list. --- bot.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/bot.py b/bot.py index 7cedb75..da56a8e 100644 --- a/bot.py +++ b/bot.py @@ -26,7 +26,8 @@ class Bot: c for c in self.client.fetch_new_comments(limit=50) if "author_name" in c - and c["author_name"] not in ["Bussy-boy", "AutoJanny", "BARD_BOT", "Snappy"] + and not c["is_bot"] + and c["author_name"] != config["username"] and c["post_id"] != 0 ] @@ -46,12 +47,7 @@ class Bot: if "author_name" not in reply: continue - if reply["author_name"] not in [ - "AutoJanny", - "BARD_BOT", - "bbbb", - "longpostbot", - ]: + if not reply["is_bot"]: self.reply(reply) def make_forced_replies(self):