Spaces:
Sleeping
Sleeping
Captain Ezio
commited on
Commit
·
483f4a5
1
Parent(s):
80d7d9c
Update kbhelpers.py
Browse files- Powers/utils/kbhelpers.py +10 -11
Powers/utils/kbhelpers.py
CHANGED
@@ -13,17 +13,16 @@ def ikb(rows=None, back=False, todo="start_back"):
|
|
13 |
try:
|
14 |
for row in rows:
|
15 |
line = []
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
lines.append(line)
|
27 |
except TypeError:
|
28 |
# make a code to handel that error
|
29 |
line = []
|
|
|
13 |
try:
|
14 |
for row in rows:
|
15 |
line = []
|
16 |
+
for button in row:
|
17 |
+
btn_text = button.split(".")[1].upper()
|
18 |
+
button = btn(btn_text, button) # InlineKeyboardButton
|
19 |
+
line.append(button)
|
20 |
+
lines.append(line)
|
21 |
+
except AttributeError:
|
22 |
+
for button in rows:
|
23 |
+
button = btn(*button) # Will make the kb which don't have "." in them
|
24 |
+
line.append(button)
|
25 |
+
lines.append(line)
|
|
|
26 |
except TypeError:
|
27 |
# make a code to handel that error
|
28 |
line = []
|