Improved the display of profiles

This commit is contained in:
Logan Cusano
2022-03-17 23:18:17 -04:00
parent 0d51b47146
commit 759f05eb0c

7
bot.py
View File

@@ -494,11 +494,14 @@ class Bot(commands.Bot):
return message_body
def display_saved_radio_configs(self):
message_body = f"Saved configs"
message_body = f"Saved configs\n"
config = configparser.ConfigParser()
if os.path.exists('./profiles.ini'):
config.read('./profiles.ini')
for section in config.sections():
message_body += f"{section}\n"
message_body += f"{section}\n" \
f"Frequency:\t\t{config[section]['Frequency']}\n" \
f"Mode:\t\t{config[section]['Mode']}\n" \
f"Squelch:\t\t{config[section]['Squelch']}\n"
return message_body