1
0
mirror of https://gitlab.com/questable/questable_bot synced 2025-10-22 17:00:06 +02:00

Add token table, get_tokens(), add_token()

This commit is contained in:
2019-03-11 18:09:48 +05:30
parent 6e55bae42c
commit 9261247115
2 changed files with 20 additions and 0 deletions

3
bot.py
View File

@@ -557,6 +557,9 @@ queries = [
("CREATE TABLE IF NOT EXISTS state(chat_id int PRIMARY KEY, state "
"varchar(10), extra varchar(10));"),
("CREATE TABLE IF NOT EXISTS tokens(chat_id int, token varchar(36),"
"UNIQUE(chat_id, token));"),
]
for query in queries:
cursor.execute(query)