init
Инициализация проекта на гите
This commit is contained in:
parent
8806f197ac
commit
4b6ca11c0c
9
config.py
Normal file
9
config.py
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
TOKEN = "7503830303:AAFCNZsNfVEPwEqaZ5BqgArV4Dfhj2Jla8w"
|
||||||
|
admin_id = 5447250264
|
||||||
|
|
||||||
|
|
||||||
|
a = 890
|
||||||
|
b = 875
|
||||||
|
c = 1345
|
||||||
|
d = 2199
|
||||||
|
print((a+b+c+d)*3)
|
43
main.py
Normal file
43
main.py
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
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.chat.id, "Доступ запрещён")
|
||||||
|
|
||||||
|
@bot.message_handler(commands=['browser'])
|
||||||
|
def browser(message):
|
||||||
|
if message.chat.id == config.admin_id:
|
||||||
|
bot.send_message(message.chat.id, "Открываю браузер")
|
||||||
|
os.system("start chrome.exe") # это для хрома
|
||||||
|
os.system("start browser.exe") # это для яндекса
|
||||||
|
else:
|
||||||
|
bot.send_message(message.chat.id, "Доступ запрещён")
|
||||||
|
|
||||||
|
@bot.message_handler(commands=['calc'])
|
||||||
|
def calc(message):
|
||||||
|
if message.chat.id == config.admin_id:
|
||||||
|
os.system('calc')
|
||||||
|
else:
|
||||||
|
bot.send_message(message.chat.id, "Доступ запрещен")
|
||||||
|
|
||||||
|
@bot.message_handler(commands=['stamina'])
|
||||||
|
def stamina(message):
|
||||||
|
if message.chat.id == config.admin_id:
|
||||||
|
bot.send_message(message.chat.id, f"открываю стамину")
|
||||||
|
os.system('start https://stamina-online.com/ru/lessons/ru')
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
bot.send_message(config.admin_id, "я умею это и это")
|
||||||
|
|
||||||
|
bot.infinity_polling()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user