Skip to content
Snippets Groups Projects
Commit 706fd251 authored by Tamas Gal's avatar Tamas Gal :speech_balloon:
Browse files

Fix parser

parent 2d3c3729
No related branches found
No related tags found
No related merge requests found
......@@ -70,13 +70,13 @@ def register_handlers(bot):
try:
with open(CONFIG, 'r') as fobj:
config = toml.load(fobj)
shifters = msg.split("shifters are ")[1].strip()
shifters = msg[3:].strip()
config['Alerts']['shifters'] = shifters
with open(CONFIG, 'w') as fobj:
toml.dump(config, fobj)
bot.send_message(
f'Alright, the new shifters are {shifters}, welcome!',
channel_id)
msg = f'Alright, the new shifters are {shifters}, welcome!'
print(msg)
bot.send_message(msg, channel_id)
except Exception as e:
bot.send_message(f'something went horribly wrong... {e}',
channel_id)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment