Added activity if there is no handler selected
This commit is contained in:
19
bot.py
19
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)
|
||||
|
||||
Reference in New Issue
Block a user