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

политика конфиденциальности

This commit is contained in:
mihalin
2022-03-17 09:44:24 +03:00
parent 02e06863e7
commit fd3645fa52
3 changed files with 34 additions and 1 deletions

View File

@@ -1,4 +1,5 @@
from aiogram import Bot as AioBot
from aiogram.types import BotCommand
from olgram.models.models import Bot
from aiohttp import web
from asyncio import get_event_loop
@@ -35,6 +36,11 @@ 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", "Политика конфиденциальности")
])
await a_bot.session.close()
del a_bot
return res