Improved the display of profiles
This commit is contained in:
7
bot.py
7
bot.py
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user