TgBot/main.py

21 lines
796 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"YR, {messege.from_user.full_name}, \n Ваш id: {messege.from_user.id}")
# os.system("start.browser.exe")
# else:
# bot.send_message(messege.chat.id, "доступ закрыт")