from requests.packages.urllib3.exceptions import ProtocolError
from requests.exceptions import ConnectionError
from telebot import types
import telebot
bot = telebot.TeleBot("TOKEN")
tg_id = None #admin id
print("BOT was started!")
@bot.message_handler(commands = ["start"])
def help_message(message):
if message.from_user.id == tg_id:
bot.send_message(message.chat.id, "Admin")
else:
bot.send_message(message.chat.id, "User")
@bot.message_handler(content_types = ["text"])
def help_message(message):
if message.text.lower().startswith(".test1"):
bot.send_message(message.from_user.id, "TEST1")
elif message.text.lower().startswith(".test2"):
bot.send_message(message.from_user.id, "TEST2")
elif message.text.lower().startswith(".test3"):
bot.send_photo(message.chat.id, open("screen.jpg", "rb"))
if __name__ == "__main__":
bot.polling(none_stop = True, interval = 0)