Answer the question
In order to leave comments, you need to log in
How to prevent the bot from stopping?
Code example:
@bot.message_handler(commands=["uid"])
def userid(message):
chat_id = message.chat.id
message_id = message.message_id
bot.send_message(chat_id=chat_id, parse_mode='html', text=f'<code>\n{message.reply_to_message.from_user.id}</code>', reply_to_message_id=message_id)
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