Answer the question
In order to leave comments, you need to log in
Why is there no error in the console, but the message (123) is not sent (aiogram)?
import logging
from aiogram import Bot, Dispatcher, executor, types
import aiogram
from aiogram.types import ReplyKeyboardRemove, \
ReplyKeyboardMarkup, KeyboardButton, \
InlineKeyboardMarkup, InlineKeyboardButton
test = False
button_hi = KeyboardButton('Привет! ', test=True)
button_hii = KeyboardButton('123')
greet_kb = ReplyKeyboardMarkup()
greet_kb.add(button_hi, button_hii)
bot = Bot(token = "туто мой токен, но я убрал")
dp = Dispatcher(bot)
logging.basicConfig(level = logging.INFO)
@dp.message_handler(commands=['start'])
async def process_start_command(message: types.Message):
await bot.send_message(message.from_user.id, test, reply_markup=greet_kb)
if test == True:
async def prdfg(message: types.Message):
await bot.send_message(message.from_user.id,'123')
if __name__ == "__main__":
executor.start_polling(dp, skip_updates=True)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question