Update: Updated the activity whenever the freq changes
This commit is contained in:
7
bot.py
7
bot.py
@@ -73,7 +73,8 @@ class Bot(commands.Bot):
|
||||
self.start_sdr()
|
||||
|
||||
await self.change_presence(activity=discord.Activity(type=discord.ActivityType.listening,
|
||||
name=f"{self.freq[:-1]} {str(self.mode).capitalize()}"),
|
||||
name=f"{self.freq[:-1]}"
|
||||
f" {str(self.mode).upper()}"),
|
||||
status=discord.Status.online)
|
||||
else:
|
||||
await ctx.send("Opus won't load")
|
||||
@@ -99,6 +100,10 @@ class Bot(commands.Bot):
|
||||
await ctx.send(f"Ok {member}, I'm changing the mode to {self.mode} and frequency to {self.freq}")
|
||||
if self.sdr_started:
|
||||
self.start_sdr()
|
||||
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)
|
||||
else:
|
||||
await ctx.send(f"{member}, {mode} is not valid. You may only enter 'fm' or 'wbfm'")
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user