forked from Pavel_Durov/python_bot
зачал бд, удалил лишнее
This commit is contained in:
10
bot.py
10
bot.py
@@ -5,9 +5,9 @@ from random import randint
|
||||
|
||||
from aiogram import Bot, Dispatcher, executor, types
|
||||
from aiogram.types import ReplyKeyboardRemove, ReplyKeyboardMarkup, KeyboardButton
|
||||
#import sql
|
||||
import sql
|
||||
|
||||
#sql.db_start()
|
||||
sql.db_start()
|
||||
|
||||
API_TOKEN = '5724991559:AAEuLvpLsgP6LHRGMSyFtQLlR5qPQUO4b_w'
|
||||
|
||||
@@ -45,6 +45,12 @@ async def dick(message: types.Message):
|
||||
numb = (f"Рандомное число : {randint(-7,10)}")
|
||||
await bot.send_message(message.chat.id, (numb))
|
||||
|
||||
@dp.message_handler(commands=["id"])
|
||||
async def id(message: types.Message):
|
||||
await sql.db_start()
|
||||
await bot.send_message(message.chat.id, f'ваш id {message.from_user.id}')
|
||||
await sql.db.close()
|
||||
|
||||
|
||||
|
||||
#####______________________ПИПИСА БОТ БУДЕТ ЗДЕСЬ__________________________________
|
||||
|
||||
Reference in New Issue
Block a user