Update: Profile update
This commit is contained in:
12
bot.py
12
bot.py
@@ -323,7 +323,7 @@ class Bot(commands.Bot):
|
||||
elif not connected:
|
||||
await self.change_presence(activity=discord.Game(name=f"@ me"), status=discord.Status.idle)
|
||||
|
||||
def save_radio_config(self, profile_name):
|
||||
async def save_radio_config(self, profile_name):
|
||||
config = configparser.SafeConfigParser()
|
||||
|
||||
if os.path.exists('./profiles.ini'):
|
||||
@@ -344,11 +344,9 @@ class Bot(commands.Bot):
|
||||
|
||||
if self.sdr_started:
|
||||
self.start_sdr()
|
||||
loop = asyncio.get_event_loop()
|
||||
coroutine = self.set_activity()
|
||||
loop.run_until_complete(coroutine)
|
||||
await self.set_activity()
|
||||
|
||||
def load_radio_config(self, profile_name):
|
||||
async def load_radio_config(self, profile_name):
|
||||
config = configparser.ConfigParser()
|
||||
if os.path.exists('./profiles.ini'):
|
||||
config.read('./profiles.ini')
|
||||
@@ -363,9 +361,7 @@ class Bot(commands.Bot):
|
||||
|
||||
if self.sdr_started:
|
||||
self.start_sdr()
|
||||
loop = asyncio.get_event_loop()
|
||||
coroutine = self.set_activity()
|
||||
loop.run_until_complete(coroutine)
|
||||
await self.set_activity()
|
||||
|
||||
return True
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user