зачал бд, удалил лишнее
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Pavel_Duron 2022-11-06 17:42:28 +10:00
parent 319624729f
commit 0f4b4caed0
4 changed files with 23 additions and 0 deletions

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 93 KiB

23
sql.py Normal file
View File

@ -0,0 +1,23 @@
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()

Binary file not shown.

Before

Width:  |  Height:  |  Size: 77 KiB