init
otkrivaet silki
This commit is contained in:
commit
3ffdde0b8e
2
config.py
Normal file
2
config.py
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
TOKEN = "7680766772:AAFz1CcOeqJiWEOhhyEJqjFQLYovufIRD7g"
|
||||||
|
admin_id = 1996058547
|
31
main.py
Normal file
31
main.py
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
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.from_caht.id, "нет иди нафиг")
|
||||||
|
@bot.message_handler(commands=['browser'])
|
||||||
|
def start(message):
|
||||||
|
if message.from_user.id == config.admin_id:
|
||||||
|
bot.send_message(message.chat.id, "открываю браузер")
|
||||||
|
os.system ("start browser.exe")
|
||||||
|
else:
|
||||||
|
bot.send_message(message.from_caht.id, "нет иди нафиг")
|
||||||
|
@bot.message_handler(commands=['calculator'])
|
||||||
|
def start(message):
|
||||||
|
if message.from_user.id == config.admin_id:
|
||||||
|
bot.send_message(message.chat.id, "открываю калькулятор")
|
||||||
|
os.system ("calc")
|
||||||
|
else:
|
||||||
|
bot.send_message(message.from_caht.id, "нет иди нафиг")
|
||||||
|
bot.infinity_polling()
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
bot.send_message(config.admin_id)
|
Loading…
x
Reference in New Issue
Block a user