добавление новых функций

This commit is contained in:
Misha 2025-02-23 14:02:25 +01:00
commit 90816a2dfe
2 changed files with 49 additions and 0 deletions

2
config.py Normal file
View File

@ -0,0 +1,2 @@
TOKEN = "7835873396:AAGfmCC_Bgoom5IoTV4QAH1HweAIzVVQ4UM"
admin_id = 1504060194

47
main.py Normal file
View File

@ -0,0 +1,47 @@
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')
import subprocess
subprocess.Popen(['notepad.exe'])
import webbrowser
url = 'https://www.example.com'
webbrowser.open(ur1)
if __name__ == "__main__":
bot.send_message(config.admin_id, "я умею это и это")
bot.infinity_polling()