Added "selectable" parameter
This commit is contained in:
parent
860d9ac281
commit
5ad8cc750d
@ -2,6 +2,7 @@
|
||||
"metadata": {
|
||||
"flag": "🇩🇪",
|
||||
"name": "Deutsch",
|
||||
"selectable": true,
|
||||
"codes": [
|
||||
"de",
|
||||
"de-AT",
|
||||
|
@ -2,6 +2,7 @@
|
||||
"metadata": {
|
||||
"flag": "🇬🇧",
|
||||
"name": "English",
|
||||
"selectable": true,
|
||||
"codes": [
|
||||
"en",
|
||||
"en-GB",
|
||||
|
@ -2,6 +2,7 @@
|
||||
"metadata": {
|
||||
"flag": "🇺🇦",
|
||||
"name": "Українська",
|
||||
"selectable": true,
|
||||
"codes": [
|
||||
"uk",
|
||||
"uk-UA"
|
||||
|
@ -33,6 +33,7 @@ async def command_language(app: PyroClient, message: Message):
|
||||
buttons = []
|
||||
|
||||
for language, data in app.in_every_locale("metadata").items():
|
||||
if data["selectable"]:
|
||||
buttons.append(
|
||||
InlineButton(f"{data['flag']} {data['name']}", f"language;{language}")
|
||||
)
|
||||
|
Reference in New Issue
Block a user