mirror of
https://github.com/civsocit/olgram.git
synced 2025-12-15 08:16:17 +00:00
inlines first iteration
This commit is contained in:
@@ -11,7 +11,7 @@ import logging
|
||||
import typing as ty
|
||||
from olgram.settings import ServerSettings
|
||||
from olgram.models.models import Bot, GroupChat, BannedUser
|
||||
|
||||
from server.inlines import inline_handler
|
||||
|
||||
_logger = logging.getLogger(__name__)
|
||||
_logger.setLevel(logging.INFO)
|
||||
@@ -136,6 +136,11 @@ async def receive_left(message: types.Message):
|
||||
await bot.save()
|
||||
|
||||
|
||||
async def receive_inline(inline_query):
|
||||
bot = db_bot_instance.get()
|
||||
return await inline_handler(inline_query, bot)
|
||||
|
||||
|
||||
async def receive_migrate(message: types.Message):
|
||||
bot = db_bot_instance.get()
|
||||
from_id = message.chat.id
|
||||
@@ -175,6 +180,7 @@ class CustomRequestHandler(WebhookRequestHandler):
|
||||
dp.register_message_handler(receive_left, content_types=[types.ContentType.LEFT_CHAT_MEMBER])
|
||||
dp.register_message_handler(receive_migrate, content_types=[types.ContentType.MIGRATE_TO_CHAT_ID])
|
||||
dp.register_message_handler(receive_group_create, content_types=[types.ContentType.GROUP_CHAT_CREATED])
|
||||
dp.register_inline_handler(receive_inline)
|
||||
|
||||
return dp
|
||||
|
||||
|
||||
Reference in New Issue
Block a user