WIP: Improvements
This commit is contained in:
parent
d9b72e5ad8
commit
01f8a73dae
76
config.json
76
config.json
@ -1,10 +1,80 @@
|
||||
{
|
||||
"owner_id": 0,
|
||||
"locale": "en",
|
||||
"bot": {
|
||||
"owner": 0,
|
||||
"api_id": 0,
|
||||
"api_hash": "",
|
||||
"bot_token": "",
|
||||
"workers": 1
|
||||
"scoped_commands": true
|
||||
},
|
||||
"use_compiled_page_saver": false
|
||||
"use_compiled_page_saver": false,
|
||||
"reports": {
|
||||
"chat_id": "owner"
|
||||
},
|
||||
"disabled_plugins": [],
|
||||
"commands": {
|
||||
"help": {
|
||||
"scopes": [
|
||||
{
|
||||
"name": "BotCommandScopeDefault"
|
||||
},
|
||||
{
|
||||
"name": "BotCommandScopeChat",
|
||||
"chat_id": "owner"
|
||||
}
|
||||
]
|
||||
},
|
||||
"balance": {
|
||||
"scopes": [
|
||||
{
|
||||
"name": "BotCommandScopeDefault"
|
||||
},
|
||||
{
|
||||
"name": "BotCommandScopeChat",
|
||||
"chat_id": "owner"
|
||||
}
|
||||
]
|
||||
},
|
||||
"topup": {
|
||||
"scopes": [
|
||||
{
|
||||
"name": "BotCommandScopeDefault"
|
||||
},
|
||||
{
|
||||
"name": "BotCommandScopeChat",
|
||||
"chat_id": "owner"
|
||||
}
|
||||
]
|
||||
},
|
||||
"setcard": {
|
||||
"scopes": [
|
||||
{
|
||||
"name": "BotCommandScopeDefault"
|
||||
},
|
||||
{
|
||||
"name": "BotCommandScopeChat",
|
||||
"chat_id": "owner"
|
||||
}
|
||||
]
|
||||
},
|
||||
"resetcard": {
|
||||
"scopes": [
|
||||
{
|
||||
"name": "BotCommandScopeDefault"
|
||||
},
|
||||
{
|
||||
"name": "BotCommandScopeChat",
|
||||
"chat_id": "owner"
|
||||
}
|
||||
]
|
||||
},
|
||||
"shutdown": {
|
||||
"scopes": [
|
||||
{
|
||||
"name": "BotCommandScopeChat",
|
||||
"chat_id": "owner"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
10
locale/en.json
Normal file
10
locale/en.json
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"commands": {
|
||||
"help": "Help menu",
|
||||
"balance": "Card's balance",
|
||||
"topup": "Refill the card",
|
||||
"setcard": "Link the card",
|
||||
"resetcard": "Unlink the card",
|
||||
"shutdown": "Turn the bot off"
|
||||
}
|
||||
}
|
10
locale/uk.json
Normal file
10
locale/uk.json
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"commands": {
|
||||
"help": "Меню допомоги",
|
||||
"balance": "Баланс картки",
|
||||
"topup": "Поповнити картку",
|
||||
"setcard": "Прив'язати картку",
|
||||
"resetcard": "Відв'язати картку",
|
||||
"shutdown": "Вимкнути бота"
|
||||
}
|
||||
}
|
@ -29,7 +29,5 @@ def userReset(userid, key: str):
|
||||
def userGet(userid, key: str):
|
||||
try:
|
||||
return sync.json_read("data/database.json")[str(userid)][key]
|
||||
except KeyError:
|
||||
return None
|
||||
except FileNotFoundError:
|
||||
except (KeyError, FileNotFoundError):
|
||||
return None
|
||||
|
Reference in New Issue
Block a user