1
0
mirror of https://github.com/civsocit/olgram.git synced 2025-12-15 08:16:17 +00:00

Chinese language support (suddenly!)

This commit is contained in:
mihalin
2022-03-22 05:43:10 +03:00
parent db54473e0f
commit 1a9646d607
18 changed files with 740 additions and 126 deletions

View File

@@ -5,6 +5,7 @@ from aiohttp import web
from asyncio import get_event_loop
import ssl
from olgram.settings import ServerSettings
from locales.locale import _
from .custom import CustomRequestHandler
import logging
@@ -37,8 +38,8 @@ async def register_token(bot: Bot) -> bool:
res = await a_bot.set_webhook(url_for_bot(bot), certificate=certificate, drop_pending_updates=True,
max_connections=10)
await a_bot.set_my_commands([
BotCommand("/start", "(Пере)запустить бота"),
BotCommand("/security_policy", "Политика конфиденциальности")
BotCommand("/start", _("(Пере)запустить бота")),
BotCommand("/security_policy", _("Политика конфиденциальности"))
])
await a_bot.session.close()