From 6b9e48d72238e1f544da8f2b40180c2ce66a5282 Mon Sep 17 00:00:00 2001 From: Logan Cusano Date: Sun, 13 Feb 2022 15:25:50 -0500 Subject: [PATCH] Added activity if there is no handler selected --- bot.py | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/bot.py b/bot.py index 0ce680b..bf1f148 100644 --- a/bot.py +++ b/bot.py @@ -285,14 +285,19 @@ class Bot(commands.Bot): # Set the activity of the bot async def set_activity(self, connected=True): if connected: - if self.profile_name is None: + if self.Handler == 'gqrx': + if self.profile_name is None: + await self.change_presence(activity=discord.Activity(type=discord.ActivityType.listening, + name=f"{self.freq[:-1]}" + f" {str(self.mode).upper()}"), + status=discord.Status.online) + elif type(self.profile_name) == str: + await self.change_presence(activity=discord.Activity(type=discord.ActivityType.listening, + name=f"{str(self.profile_name).upper()}"), + status=discord.Status.online) + else: await self.change_presence(activity=discord.Activity(type=discord.ActivityType.listening, - name=f"{self.freq[:-1]}" - f" {str(self.mode).upper()}"), - status=discord.Status.online) - elif type(self.profile_name) == str: - await self.change_presence(activity=discord.Activity(type=discord.ActivityType.listening, - name=f"{str(self.profile_name).upper()}"), + name=f"the airwaves"), status=discord.Status.online) elif not connected: await self.change_presence(activity=discord.Game(name=f"@ me"), status=discord.Status.idle)