Create keyboards.py
Browse files- chatbot/plugins/keyboards.py +11 -0
chatbot/plugins/keyboards.py
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton
|
2 |
+
from chatbot.plugins.languages import LANGUAGES
|
3 |
+
|
4 |
+
def get_language_keyboard():
|
5 |
+
keyboard = []
|
6 |
+
for lang_code, lang_name in LANGUAGES.items():
|
7 |
+
keyboard.append(
|
8 |
+
[InlineKeyboardButton(lang_name, callback_data=f"lang_{lang_code}")]
|
9 |
+
)
|
10 |
+
keyboard.append([InlineKeyboardButton("Cancel", callback_data="cancel")])
|
11 |
+
return InlineKeyboardMarkup(keyboard)
|