python_bot/sql.py
Pavel_Duron 99533b80e6
All checks were successful
continuous-integration/drone/push Build is passing
зачал бд, удалил лишнее
2022-11-07 17:04:34 +10:00

27 lines
466 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(id INTEGER PRIMARY KEY, users_id INTEGER, user_name TEXT, dick_size INTEGER)''')
db.commit()
async def add_user(id):
cur.execute('''INSERT INTO users (users_id) VALUES (?)''',(id))
id = message.from_user.id
db.commit()
db.commit()