From 8af2935195ad28c74933bf2c05aedabcc97f23fa Mon Sep 17 00:00:00 2001 From: Someone Date: Mon, 10 Jan 2022 01:08:56 +0100 Subject: [PATCH] modules/WSModRemovePostTextEnforcer.py --- modules/WSModRemovePostTextEnforcer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/WSModRemovePostTextEnforcer.py b/modules/WSModRemovePostTextEnforcer.py index 4de8da1..4d1100b 100644 --- a/modules/WSModRemovePostTextEnforcer.py +++ b/modules/WSModRemovePostTextEnforcer.py @@ -14,12 +14,12 @@ class WSModRemovePostTextEnforcer(AbstractWSHandler): post = json.loads(data["data"]["post"]) if "has_reactions" not in post: post["has_reactions"] = False - #post = self.bot.api.get_post(post["id"]) if "somebot_removed_post_text" in post["props"] and post["message"] != "": self.bot.api.update_post(post["id"], message=None, is_pinned=post["is_pinned"], has_reactions=post["has_reactions"], props=post["props"]) self.bot.debug_chan("``WSModRemovePostTextEnforcer: Post edit-attempt reverted. Post-id: ``**``"+post["id"]+"``**`` Text was:``\n\n----\n\n"+post["message"]) + return True + else: import pprint pprint.pprint(data) - self.bot.command_stats_inc("ws::"+evtype+"::"+self.NAME, amount=-1) -- 2.43.0