import config
import asyncio
from aiogram import Bot, Dispatcher, executor, types
from aiogram.bot import api
from aiogram.types.message import ContentType
bot = Bot(config.token)
dp = Dispatcher(bot=bot)
def buy_menu(isurl=True, url="", bill=""):
qiwiMenu = InlineKeyboardMarkup(row_width=1)
if isurl:
btnUrlQIWI = InlineKeyboardButton(text='URL', url=url)
qiwiMenu.insert(btnUrlQIWI)
btnCheckQIWI = InlineKeyboardButton(text='Bought', callback_data="check_" + bill)
qiwiMenu.insert(btnCheckQIWI)
return qiwiMenu
@dp.callback_query_handler(lambda call: True)
@dp.message_handler(commands=['start'])
async def after(call):
await bot.send_message(call.chat.id, "send_message", reply_markup=buy_menu)
@dp.callback_query_handler(text_contains = "check_")
async def check_(callback: types.CallbackQuery, callback_data: dict):
if callback_data == check_:
print('Success')
if __name__=="__main__":
executor.start_polling(dp, skip_updates=True)
После нажатия на кнопку Bought ничего не происходит, должно выводиться в консоль Success