fix missing function
This commit is contained in:
@@ -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}'")
|
||||
Reference in New Issue
Block a user