From dabeba8033298ee81d1c24c854b1217927a8d733 Mon Sep 17 00:00:00 2001 From: Anton Date: Sun, 23 Feb 2025 13:05:39 +0100 Subject: [PATCH] =?UTF-8?q?=D0=97=D0=B0=D0=B3=D1=80=D1=83=D0=B7=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20=D1=84=D0=B0=D0=B9=D0=BB=D1=8B=20=D0=B2=20=C2=AB?= =?UTF-8?q?/=C2=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.py | 2 ++ main.py | 23 +++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 config.py create mode 100644 main.py diff --git a/config.py b/config.py new file mode 100644 index 0000000..1698004 --- /dev/null +++ b/config.py @@ -0,0 +1,2 @@ +TOKEN = "7755784518:AAExEc46j6-ZoNqvcD_8hCf5ZVQ5KqGAWLY" +admin_id = 6233870703 \ No newline at end of file diff --git a/main.py b/main.py new file mode 100644 index 0000000..57bd70d --- /dev/null +++ b/main.py @@ -0,0 +1,23 @@ +import telebot +import config +import os +bot = telebot.TeleBot(token=config.TOKEN) +@bot.message_handler(commands=["start"]) +def start(messege): + if messege.from_user.id == config.admin_id: + bot.send_message(messege.chat.id, f"Привет, {messege.from_user.full_name}, \n Ваш id: {messege.from_user.id}") + else: + bot.send_messege(messege.chat.id, "Доступ закрыт") +bot.infinity_polling() +@bot.message_handler(commands=['start']) +def browser(messege): + if messege.from_user.id == config.admin_id: + bot.send_message(messege.chat.id, f"Привет, {messege.from_user.full_name}, \n Ваш id: {messege.from_user.id}") + os.system("start.browser.exe") + else: + bot.send_message(messege.chat.id, "доступ закрыт") + + +if __name__== "__main__": + bot.send_messege(config.admin_id, "я умею это и это") +bot.infinity_polling() \ No newline at end of file