more commenting and error correction in updater

This commit is contained in:
Linus E
2022-04-26 12:07:56 +02:00
parent 7672756426
commit 42a5ad4a12
2 changed files with 18 additions and 9 deletions

View File

@@ -118,7 +118,7 @@ def send_all_users(message):
bot.send_message(chat_id=user_id, text=f'Username: {username}\nEmail: {email}\nID: {id}\nCron: {cron}\nAdmin: {admin}') # format user data into readable message text
@bot.message_handler(commands=['setAdmin', 'SetAdmin']) # set admin rights to user TBD: not working!!
@bot.message_handler(commands=['setAdmin', 'SetAdmin', 'setadmin', 'Setadmin']) # set admin rights to user TBD: not working!!
def set_admin(message):
""" Set admin rights to user
@@ -150,6 +150,7 @@ def set_admin_step(message):
email = args_message[0]
is_admin = args_message[1]
status = api_handler.set_admin(email, is_admin) # set admin in db
if(status == 200):