From 59449fda465f93a97e36569cb5541c92124e2802 Mon Sep 17 00:00:00 2001 From: Randy Price Date: Sun, 12 Oct 2025 13:32:34 -0400 Subject: [PATCH] feat: add custom messages --- yapper.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/yapper.py b/yapper.py index ad8222c..cf6c9f5 100644 --- a/yapper.py +++ b/yapper.py @@ -61,9 +61,18 @@ async def on_voice_state_update( "is gaming in", ] segway = random.choice(variety) + voice_channel_message = ( - f"@here {member.display_name} {segway} {after.channel.name}" + f"@here {member.display_name} {segway} {after.channel.name}." ) + custom_suffixes = { + "gandhigandhi": "Ask him about his sauerkraut.", + "jdkatfrog": "Wait a minute... that can't be right...", + "randyprice4": "Oh god... is he wearing Heelys? Restrain him!", + "tyfar13": "Hide your printers, hide your chicken parms!", + } + if member.name in custom_suffixes: + voice_channel_message += f" {custom_suffixes[member.name]}" # Send the notification. _logger.info(f"sending {CHANNEL_TO_NOTIFY} - {voice_channel_message}") @@ -80,7 +89,8 @@ async def on_voice_state_update( def main() -> None: """Start the client and reconnect on failure.""" logging.basicConfig( - format="[%(levelname)s]: %(message)s", level=logging.INFO, + format="[%(levelname)s]: %(message)s", + level=logging.INFO, ) client.run(AUTHENTICATION_TOKEN, reconnect=True, log_level=logging.INFO)