0.3.9.7.a2

Simple fix to (hopefully) remove status prefixes
This commit is contained in:
Franz Rolfsvaag 2025-08-11 03:56:36 +02:00
parent 8fb7a9dab5
commit b6980794d7
2 changed files with 12 additions and 10 deletions

2
bot.py
View File

@ -9,7 +9,7 @@ from modules.common.boot_notice import post_boot_notice
# Version consists of: # Version consists of:
# Major.Enhancement.Minor.Patch.Test (Test is alphanumeric; doesnt trigger auto update) # Major.Enhancement.Minor.Patch.Test (Test is alphanumeric; doesnt trigger auto update)
VERSION = "0.3.9.7.a1" VERSION = "0.3.9.7.a2"
# ---------- Env loading ---------- # ---------- Env loading ----------

View File

@ -40,7 +40,8 @@ DUNE_PHRASES = [
"Ornithopters in the storm.", "Ornithopters in the storm.",
"Sardaukar march.", "Sardaukar march.",
"Prescience veils the future.", "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. # Concise fun facts (will be numbered). Keep them reasonably short.
@ -149,16 +150,17 @@ class StatusRotatorCog(commands.Cog):
if not text: if not text:
return return
atype = random.choice([ # Enforce Custom Status; if it fails for any reason, fall back to Watching.
discord.ActivityType.watching,
discord.ActivityType.playing,
discord.ActivityType.listening
])
try: 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: 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 ---- # ---- helpers ----