-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwindows_bot.py
More file actions
112 lines (104 loc) · 4.36 KB
/
windows_bot.py
File metadata and controls
112 lines (104 loc) · 4.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
import time
from telebot import types
import config
def windows_func(bot):
@bot.message_handler(func=lambda message: message.text == config.BTN_WDW)
def windows_menu(message):
kb_windows = types.ReplyKeyboardMarkup(
resize_keyboard=True, one_time_keyboard=True
)
button = types.KeyboardButton
kb_windows.row(
button(config.BTN_WDW_TEXT_1),
button(config.BTN_WDW_TEXT_2),
button(config.BTN_WDW_TEXT_3),
)
kb_windows.row(button(config.BTN_WDW_TEXT_4), button(config.BTN_WDW_TEXT_5))
kb_windows.row(button(config.BTN_WDW_TEXT_6), button(config.MAIN_MENU))
bot.send_message(
message.chat.id, "Выберите желаемый продукт...", reply_markup=kb_windows
)
@bot.message_handler(func=lambda message: message.text == config.BTN_WDW_TEXT_1)
def install_kasp(message):
kb_kasp = types.ReplyKeyboardMarkup(
resize_keyboard=True, one_time_keyboard=True
)
button = types.KeyboardButton
kb_kasp.add(button(config.BTN_WDW), button(config.MAIN_MENU))
bot.send_document(message.chat.id, config.LINK_KASP, reply_markup=kb_kasp)
@bot.message_handler(func=lambda message: message.text == config.BTN_WDW_TEXT_2)
def install_ass(message):
kb_kasp = types.ReplyKeyboardMarkup(
resize_keyboard=True, one_time_keyboard=True
)
button = types.KeyboardButton
kb_kasp.add(button(config.BTN_WDW), button(config.MAIN_MENU))
bot.send_message(message.chat.id, config.ASSISTANT_SERVER)
bot.send_document(message.chat.id, config.LINK_ASS, reply_markup=kb_kasp)
@bot.message_handler(func=lambda message: message.text == config.BTN_WDW_TEXT_3)
def install_ass_c(message):
kb_install_ass_c = types.ReplyKeyboardMarkup(
resize_keyboard=True, one_time_keyboard=True
)
button = types.KeyboardButton
kb_install_ass_c.add(button(config.BTN_WDW), button(config.MAIN_MENU))
bot.send_document(message.chat.id, config.LINK_ASS_C_1)
time.sleep(0.5)
bot.send_document(message.chat.id, config.LINK_ASS_C_2)
time.sleep(0.5)
bot.send_message(
message.chat.id,
config.TEXT_WDW_TEXT_1,
reply_markup=kb_install_ass_c,
)
@bot.message_handler(
func=lambda message: message.text == config.BTN_WDW_TEXT_4
)
def sert_egisz_and_epgu_for_windows(message):
kb_sert = types.ReplyKeyboardMarkup(
resize_keyboard=True, one_time_keyboard=True
)
button = types.KeyboardButton
kb_sert.add(button(config.BTN_WDW), button(config.MAIN_MENU))
bot.send_message(
message.chat.id,
config.TEXT_WDW_TEXT_2,
)
time.sleep(1)
bot.send_document(message.chat.id, config.LINK_SERT_EGISZ_EGPU_1)
time.sleep(0.5)
bot.send_document(message.chat.id, config.LINK_SERT_EGISZ_EGPU_2)
time.sleep(0.5)
bot.send_document(message.chat.id, config.LINK_SERT_EGISZ_EGPU_3)
time.sleep(0.5)
bot.send_document(
message.chat.id, config.LINK_SERT_EGISZ_EGPU_4, reply_markup=kb_sert
)
@bot.message_handler(func=lambda message: message.text == config.BTN_WDW_TEXT_5)
def install_crypto_pro(message):
kb_crypto_pro = types.ReplyKeyboardMarkup(
resize_keyboard=True, one_time_keyboard=True
)
button = types.KeyboardButton
kb_crypto_pro.add(button(config.BTN_WDW), button(config.MAIN_MENU))
bot.send_document(message.chat.id, config.LINK_CRYPTO_4_99)
time.sleep(0.5)
bot.send_document(
message.chat.id, config.LINK_CRYPTO_4_99_txt, reply_markup=kb_crypto_pro
)
@bot.message_handler(
func=lambda message: message.text == config.BTN_WDW_TEXT_6
)
def install_check_fss(message):
kb_check_fss = types.ReplyKeyboardMarkup(
resize_keyboard=True, one_time_keyboard=True
)
button = types.KeyboardButton
kb_check_fss.add(button(config.BTN_WDW), button(config.MAIN_MENU))
bot.send_document(message.chat.id, config.LINK_ERS_FSS_PROG)
time.sleep(0.5)
bot.send_message(
message.chat.id,
config.TEXT_WDW_TEXT_3,
reply_markup=kb_check_fss,
)