Added "selectable" parameter

This commit is contained in:
Profitroll 2023-08-11 22:46:30 +02:00
parent 860d9ac281
commit 5ad8cc750d
Signed by: profitroll
GPG Key ID: FA35CAB49DACD3B2
4 changed files with 7 additions and 3 deletions

View File

@ -2,6 +2,7 @@
"metadata": {
"flag": "🇩🇪",
"name": "Deutsch",
"selectable": true,
"codes": [
"de",
"de-AT",

View File

@ -2,6 +2,7 @@
"metadata": {
"flag": "🇬🇧",
"name": "English",
"selectable": true,
"codes": [
"en",
"en-GB",

View File

@ -2,6 +2,7 @@
"metadata": {
"flag": "🇺🇦",
"name": "Українська",
"selectable": true,
"codes": [
"uk",
"uk-UA"

View File

@ -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}")
)