I
I
Ivan Naumov2020-06-26 13:40:03
Python
Ivan Naumov, 2020-06-26 13:40:03

How to remove the keyboard in Telegram?

I recently moved from telebot to aiogram and ran into a problem. When using the telebot library, it was not necessary to remove the keyboard (every message had no keyboard by default), but in aiogram you need to do it manually. How can I do that?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
soremix, 2020-06-26
@SoreMix

Has the default keyboard is how? The library adds random buttons to messages or something
reply_markup=types.ReplyKeyboardRemove()

Дмитрий Самофалов, 2020-09-03
@sensible_unit

from aiogram import types

@dp.message_handler()
async def all_msg_handler(message: types.Message):
    reply_text = "Ответ на сообщение..."
    await message.reply(reply_text, reply_markup=types.ReplyKeyboardRemove())

Y
y_o_l_k_i_n___e_g_o_r, 2021-01-15
@y_o_l_k_i_n___e_g_o_r

просто отправь пустой reply_markup:

@dp.message_handler()
async def all_msg_handler(message: types.Message):
    await ms.reply('прячем клавиатуру', reply_markup='')

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question