TgBot/main.py

23 lines
923 B
Python

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