Answer the question
In order to leave comments, you need to log in
How to mention two people, the person who wrote the command word in response to the message and the person whose message was answered?
I am making a bot that will show actions in the chat, for example
One person replies to a message or mentions another member of the group with the word "hit", etc., and the bot at that time sends the message "@user1 hit @user2", then how to implement (so that a clickable full_name is written)?
This code works for me in chat, but the problem is that the bot writes the name of the bot and does not mention anyone, that is, "usernae hit bot". (I am rewriting the code from the already finished one, because I am learning)
@bot.message_handler(commands=['kick'])
def lalala(message):
kick = open('static/kick.webp', 'rb')
bot.send_sticker(message.chat.id, kick)
bot.send_message(message.chat.id, "{0.first_name} ударил {1.first_name}".format(message.from_user, bot.get_me()),
parse_mode='html')
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