From d74779ac5965447d3168868226e3640cdca71c48 Mon Sep 17 00:00:00 2001 From: Gulembo Date: Sun, 23 Feb 2025 13:33:49 +0100 Subject: [PATCH] init MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit инициализация проекта --- config.py | 2 ++ main.py | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 40 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..c95f852 --- /dev/null +++ b/config.py @@ -0,0 +1,2 @@ +TOKEN = "7766730182:AAG9NymRHyBcrjUnECBBJkJrpUaaxkQDU3c" +admin_id = 5508456202 \ No newline at end of file diff --git a/main.py b/main.py new file mode 100644 index 0000000..19353dc --- /dev/null +++ b/main.py @@ -0,0 +1,38 @@ +import telebot +import config +import os + +bot = telebot.TeleBot(token=config.TOKEN) + +@bot.message_handler(commands=['start']) +def start(message): + if message.from_user.id == config.admin_id: + bot.send_message(message.chat.id, f"Приветствую вас, {message.from_user.full_name}, \n Ваш id: {message.from_user.id}") + else: + bot.send_message(message.chat.id, "Доступ запрещён") + +@bot.message_handler(commands=['calc']) +def calc(message): + if message.chat.id == config.admin_id: + os.system('calc') + else: + bot.send_message(message.chat.id, "Доступ запрещен") + +@bot.message_handler(commands=['stamina']) +def stamina(message): + if message.chat.id == config.admin_id: + bot.send_message(message.chat.id, f"открываю стамину") + os.system('start https://stamina-online.com/ru/lessons/ru') + + + + + +if __name__ == "__main__": + bot.send_message(config.admin_id, "я умею это и это") + +bot.infinity_polling() + + + +