From b6980794d73a43b6ecc6a36e72f2e13fc9d9c128 Mon Sep 17 00:00:00 2001 From: Franz Rolfsvaag Date: Mon, 11 Aug 2025 03:56:36 +0200 Subject: [PATCH] 0.3.9.7.a2 Simple fix to (hopefully) remove status prefixes --- bot.py | 2 +- modules/status/status_rotator.py | 20 +++++++++++--------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/bot.py b/bot.py index 6bb10a1..c56026d 100644 --- a/bot.py +++ b/bot.py @@ -9,7 +9,7 @@ from modules.common.boot_notice import post_boot_notice # Version consists of: # Major.Enhancement.Minor.Patch.Test (Test is alphanumeric; doesn’t trigger auto update) -VERSION = "0.3.9.7.a1" +VERSION = "0.3.9.7.a2" # ---------- Env loading ---------- diff --git a/modules/status/status_rotator.py b/modules/status/status_rotator.py index 39d0609..a748cc1 100644 --- a/modules/status/status_rotator.py +++ b/modules/status/status_rotator.py @@ -40,7 +40,8 @@ DUNE_PHRASES = [ "Ornithopters in the storm.", "Sardaukar march.", "Prescience veils the future.", - "Fedāykin watchful in the dunes." + "Fedāykin watchful in the dunes.", + "Made with ❤️ in 🇳🇴" ] # Concise fun facts (will be numbered). Keep them reasonably short. @@ -149,16 +150,17 @@ class StatusRotatorCog(commands.Cog): if not text: return - atype = random.choice([ - discord.ActivityType.watching, - discord.ActivityType.playing, - discord.ActivityType.listening - ]) - + # Enforce Custom Status; if it fails for any reason, fall back to Watching. try: - await self.bot.change_presence(activity=discord.Activity(type=atype, name=text)) + await self.bot.change_presence(activity=discord.CustomActivity(name=text)) except Exception as e: - print("[status] change_presence failed:", repr(e)) + print("[status] custom presence failed, falling back to Watching:", repr(e)) + try: + await self.bot.change_presence( + activity=discord.Activity(type=discord.ActivityType.watching, name=text) + ) + except Exception as e2: + print("[status] change_presence failed:", repr(e2)) # ---- helpers ----