Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- elif (len(answer) == 2) and (answer[0] == "кафт") and (answer[1] == "варны"):
- allow = '''SELECT role FROM {table} WHERE user_id = "%s"''' % user_id
- cur.execute(allow.format(table=qw))
- allow1 = cur.fetchone()
- for allow1 in allow1:
- if allow1 == "Администратор" or allow1 == "Модератор" or allow1 == "Помощник":
- warns = '''SELECT * FROM {table}'''
- cur.execute(warns.format(table=qw))
- amount = cur.fetchall()
- info2 = [amount for amount in amount]
- truth = all(item[1] == 0 for item in info2)
- if truth == True:
- vk.method("messages.send", {"peer_id": chat_id, "message": "Пользователи с предупреждениями отсутствуют!", "random_id": 0})
- if truth == False:
- warnn = '''SELECT full, warns FROM {table} WHERE warns > 0'''
- cur.execute(warnn.format(table=qw))
- result = cur.fetchall()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement