From 63309cc09484d8c8588cb97cc77558c803afa116 Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 4 Dec 2024 12:16:43 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20=D0=BF=D1=80=D0=BE=D0=B2=D0=B5=D1=80=D0=BA?= =?UTF-8?q?=D0=B8=20=D0=B0=D0=B9=D0=B4=D0=B8=20=D0=BF=D0=BE=D0=BB=D1=8C?= =?UTF-8?q?=D0=B7=D0=BE=D0=B2=D0=B0=D1=82=D0=B5=D0=BB=D1=8F=20=D0=B8=20?= =?UTF-8?q?=D1=87=D0=B0=D1=82=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tg.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/tg.py b/tg.py index ec38da3..7cfc93a 100644 --- a/tg.py +++ b/tg.py @@ -98,7 +98,9 @@ def help(message): /bal - Баланс /pay ник сумма - Перевод /stats - Статистика -/gen_token - (Ре)генерация токена API` +/gen_token - (Ре)генерация токена API +/chat_id - Айди чата +/user_id - Айди пользователя` [Исходный код](https://gitea.del.pw/justuser/CryptoDM) [API и документация](https://cdm-api.del.pw/docs#/) @@ -285,6 +287,15 @@ def gen_token_tg(message): ⚠️ВНИМАНИЕ, не передавайте никому токен. Администрация не спрашивает токены.⚠️''', parse_mode='HTML') +@bot.message_handler(commands=['chat_id']) +def chat_id(message): + bot.reply_to(message, f'chat_id: `{message.chat.id}`', parse_mode='Markdown') + +@bot.message_handler(commands=['user_id']) +def user_id(message): + bot.reply_to(message, f'user_id: `{message.from_user.id}`', parse_mode='Markdown') + + @bot.message_handler(func=lambda message: True) def checks(message): if message.text == 'Баланс':