Answer the question
In order to leave comments, you need to log in
When you press a button in a group, does the telegram bot respond by tagging something in PM, and not in the group?
@dp.message_handler(commands=["start"])
async def start_command(message: types.Message):
await message.reply('Hello! If you want to know some information, click on one of the buttons below',
reply_markup =InlineKeyboardMarkup().row(
InlineKeyboardButton(text="Dates", callback_data="button1"),
InlineKeyboardButton(text="Information", callback_data='button2')
@dp.callback_query_handler(lambda c: c.data == " button1")
async def process_callback_button1(callback_query: types.CallbackQuery):
await bot.answer_callback_query(callback_query.id)
await bot.send_message(callback_query.from_user.id ,"I don't know what else will happen here, but I'll figure it out later!")
For the second day I've been trying to build a bot in different ways so that when I click on the buttons, it would answer me in a group, and not in PM .
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