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

Improve message

parent 486838a4
No related branches found
No related tags found
No related merge requests found
...@@ -76,8 +76,8 @@ def register_handlers(bot): ...@@ -76,8 +76,8 @@ def register_handlers(bot):
return return
if not is_shifter(user) and not is_operator(user): if not is_shifter(user) and not is_operator(user):
bot.send_message( bot.send_message(
"Only operators and shifters are allowed to mess " "Sorry @{}, only operators and shifters are allowed to mess "
"with me, sorry...", channel_id) "with me, sorry...".format(user), channel_id)
return return
status = subprocess.check_output(['supervisorctl', 'status']) status = subprocess.check_output(['supervisorctl', 'status'])
bot.send_message(status, channel_id) bot.send_message(status, channel_id)
...@@ -87,8 +87,9 @@ def register_handlers(bot): ...@@ -87,8 +87,9 @@ def register_handlers(bot):
print("skipping") print("skipping")
return return
if not is_operator(user): if not is_operator(user):
bot.send_message("Only operators are allowed to set shifters!", bot.send_message(
channel_id) "Sorry @{}, only operators are allowed to set shifters!".
format(user), channel_id)
return return
try: try:
with open(CONFIG, 'r') as fobj: with open(CONFIG, 'r') as fobj:
......
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