From 0f965693f26e6563c1a103f758b116a1df4a6ccb Mon Sep 17 00:00:00 2001 From: Aevann Date: Mon, 12 Feb 2024 18:43:34 +0200 Subject: [PATCH] do this https://rdrama.net/h/countryclub/post/239454/-/5796748#context --- files/helpers/actions.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/files/helpers/actions.py b/files/helpers/actions.py index 34aa9f979..5be3c86b8 100644 --- a/files/helpers/actions.py +++ b/files/helpers/actions.py @@ -23,6 +23,7 @@ from files.helpers.logging import log_file from files.helpers.sanitize import * from files.helpers.settings import get_setting from files.helpers.slots import check_slots_command +from files.helpers.useractions import badge_grant from files.routes.routehelpers import check_for_alts @@ -167,7 +168,26 @@ def execute_snappy(post, v): msg = f"@Snappy has given [{post.title}]({post.shortlink}) the Glowie Award and you have received {awarded_coins} coins as a result!" send_repeatable_notification(post.author.id, msg) + elif body.startswith("You're a chud, CHUD I tell you"): + award_object = AwardRelationship( + user_id=snappy.id, + kind="chud", + post_id=post.id, + awarded_utc=time.time(), + note="Trans lives matter", + ) + g.db.add(award_object) + msg = f"@Snappy has given [{post.title}]({post.shortlink}) the Chud Award\n\n**You now have to say this phrase in all posts and comments you make for 24 hours:**\n\n> Trans lives matter" + send_repeatable_notification(post.author.id, msg) + + if v.chud != 1: + if v.chud and time.time() < v.chud: v.chud += 86400 + else: v.chud = int(time.time()) + 86400 + v.chud_phrase = 'trans lives matter' + badge_grant(user=v, badge_id=58) + post.chudded = True + complies_with_chud(post) body += "\n\n"