0.3.9.7.a2
Simple fix to (hopefully) remove status prefixes
This commit is contained in:
parent
8fb7a9dab5
commit
b6980794d7
2
bot.py
2
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 ----------
|
||||
|
||||
|
@ -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 ----
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user