Guest User

Untitled

a guest
Feb 22nd, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. class check():
  2. def checkUser(self, telegram_id):
  3. if telegram_id == 235987:
  4. return {'user': True, 'typ': 2}
  5. else:
  6. return {'user': False}
  7.  
  8.  
  9. class function_Bot():
  10. def addUsers(self, keys, my_telegram_id):
  11. global key
  12. if 'key' in globals():
  13. if key == keys:
  14. print("Ключ совпадает")
  15. else:
  16. print("ключ не совпадает")
  17. else:
  18. checkUser = check().checkUser(my_telegram_id) #вызов функции checkUser из класса check
  19. if (checkUser['user'] == True) and checkUser['typ'] == 2:
  20. key = 20 #инициализация значения
  21. print("Создал ")
  22. else:
  23. print("нет прав")
Add Comment
Please, Sign In to add comment