A
A
Alim Yakushev2022-04-19 17:15:35
Bots
Alim Yakushev, 2022-04-19 17:15:35

How to make the bot make a mention(@username) that sent, for example, a command (more details in the details of the question)?

Here is an example:
@Jack: /start
@bot: Hello @jack!
so that the bot mentions the person who wrote the command / message
Library: Telebot or you can Aiogram Yap
: Python

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
flameyolo, 2022-04-19
@flameyolo

@dp.message_handler(commands="testing")
async def cmd_testing(message: types.Message):
    await message.answer(f'@{message.from_user.username}')

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question