From 05685cd51a0983fa0d1523ff81fa388f29a68c7a Mon Sep 17 00:00:00 2001 From: 3err0 Date: Sun, 23 Jun 2019 12:43:02 +0800 Subject: [PATCH] myid --- main.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main.py b/main.py index bf2e1a6..da0eaba 100644 --- a/main.py +++ b/main.py @@ -29,6 +29,10 @@ def file_ext(filename): def send_welcome(message): bot.reply_to(message, "Я тупая машина, и я ничего не умею") +@bot.message_handler(commands=['id', 'myid']) +def my_id(message): + bot.send_message(message.chat.id, 'Твой ID: ' + str(message.chat.id)) + @bot.message_handler(func=lambda message: True) def echo_message(message): bot.reply_to(message, message.text)