Загрузить файлы в «/»

This commit is contained in:
Anton 2025-02-23 13:05:39 +01:00
commit dabeba8033
2 changed files with 25 additions and 0 deletions

2
config.py Normal file
View File

@ -0,0 +1,2 @@
TOKEN = "7755784518:AAExEc46j6-ZoNqvcD_8hCf5ZVQ5KqGAWLY"
admin_id = 6233870703

23
main.py Normal file
View File

@ -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()