fix missing function

This commit is contained in:
Logan Cusano
2025-07-14 22:26:57 -04:00
parent aee6e40792
commit e8c79454a5

View File

@@ -166,4 +166,16 @@ class DiscordBotManager:
raise RuntimeError("Could not load a valid Opus library. Voice functionality will fail.")
if not opus.is_loaded():
raise RuntimeError("Opus library could not be loaded. Please ensure it is installed correctly.")
raise RuntimeError("Opus library could not be loaded. Please ensure it is installed correctly.")
async def set_presence(self, system_name: str):
if not self.bot or not self.bot.is_ready():
LOGGER.warning("Bot is not ready, cannot set presence.")
return
try:
activity = Activity(type=ActivityType.listening, name=system_name)
await self.bot.change_presence(activity=activity)
LOGGER.info(f"Bot presence set to 'Listening to {system_name}'")
except Exception as pe:
LOGGER.error(f"Unable to set presence: '{pe}'")