python_bot/sql.py
Pavel_Duron 0f4b4caed0
All checks were successful
continuous-integration/drone/push Build is passing
зачал бд, удалил лишнее
2022-11-06 17:42:28 +10:00

24 lines
495 B
Python

import sqlite3 as sq
async def db_start():
global db, cur
db = sq.connect('dickpick.db')
cur = db.cursor()
cur.execute('CREATE TABLE IF NOT EXISTS users(users_id TEXT PRIMARY KEY, user_name TEXT, dick_size INT)')
db.commit()
async def add_user():
user_id = message.from_user.id
cur.execute('INSERT INTO users VALUES(users_id, ?, ?)')
user_name = message.from_user.full_name
cur.execute('INSERT INTO users VALUES(?, user_name, ?)')
db.commit()