forked from Pavel_Durov/python_bot
27 lines
472 B
Python
27 lines
472 B
Python
import sqlite3 as sq
|
|
import aiogram
|
|
|
|
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, user_name) VALUES (?)''',[id, fullname])
|
|
db.commit()
|
|
|
|
|
|
db.commit()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|