This repository has been archived by the owner on Apr 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkeyboards.py
143 lines (131 loc) · 3.74 KB
/
keyboards.py
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
from aiogram.types import InlineKeyboardMarkup, KeyboardButton, ReplyKeyboardMarkup
from aiogram.types import inline_keyboard
from aiogram.types.inline_keyboard import InlineKeyboardButton
from aiogram.utils import callback_data
from callback_datas import plan_callback, timetable_callback, clean_callback, delete_callback
from emodji import *
# --- Main menu ---
btnPlans = KeyboardButton("ПЛАНЫ" + success)
btnTimeTable = KeyboardButton("РАСПИСАНИЕ" + success)
mainMenu = ReplyKeyboardMarkup(resize_keyboard=True).add(btnPlans, btnTimeTable)
# --- Other menu ---
btnMain = KeyboardButton("BACK TO MAIN MENU")
otherMenu = ReplyKeyboardMarkup(resize_keyboard=True).add(btnMain)
# --- Add plan? ---
choice_plans = InlineKeyboardMarkup(
row_width=1,
inline_keyboard=[
[
InlineKeyboardButton(
text="Добавить новый план" + add_one,
callback_data=plan_callback.new(ans="add")
)
],
[
InlineKeyboardButton(
text="Удалить план" + del_one,
callback_data="add:del"
)
],
[
InlineKeyboardButton(
text="Показать список планов" + planlist,
callback_data="add:watch"
)
],
[
InlineKeyboardButton(
text="Очистить список" + rubbish,
callback_data="add:clear"
)
]
]
)
# --- Add timetable? ---
choice_timetable = InlineKeyboardMarkup(
row_width=1,
inline_keyboard=[
[
InlineKeyboardButton(
text="ПОНЕДЕЛЬНИК",
callback_data=timetable_callback.new(ans="monday")
)
],
[
InlineKeyboardButton(
text="ВТОРНИК",
callback_data="day:tuesday"
)
],
[
InlineKeyboardButton(
text="СРЕДА",
callback_data="day:wednesday"
)
],
[
InlineKeyboardButton(
text="ЧЕТВЕРГ",
callback_data="day:trusday"
)
],
[
InlineKeyboardButton(
text="ПЯТНИЦА",
callback_data="day:friday"
)
],
[
InlineKeyboardButton(
text="СУББОТА",
callback_data="day:sunday"
)
]
]
)
# --- Clear list YES/NO ---
choice_clean = InlineKeyboardMarkup(
row_width=2,
inline_keyboard=[
[
InlineKeyboardButton(
text="Да",
callback_data=clean_callback.new(ans="yes")
)
],
[
InlineKeyboardButton(
text="Отмена",
callback_data="clean:cancel"
)
]
]
)
choice_add = InlineKeyboardMarkup(
row_width=2,
inline_keyboard=[
[
InlineKeyboardButton(
text="Да",
callback_data=plan_callback.new(ans="add")
)
],
[
InlineKeyboardButton(
text="Отмена",
callback_data="add:cancel"
)
]
]
)
choice_del_tt = InlineKeyboardMarkup(
row_width=2,
inline_keyboard=[
[
InlineKeyboardButton(
text="Очистить",
callback_data=delete_callback.new(ans="del")
)
]
]
)