Update: Profile update

This commit is contained in:
Logan Cusano
2021-12-29 00:50:37 -05:00
parent 1229d60d87
commit 49841a04a3

12
bot.py
View File

@@ -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: