mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Add ReplyKeyboardMarkup, KeyboardButton, InlineKeyboardMarkup, InlineKeyboardButton, ForceReply and parse reply_markup
This commit is contained in:
parent
5874291b15
commit
7003b088fc
4 changed files with 126 additions and 5 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import asyncio
|
||||
import json
|
||||
|
||||
import aiohttp
|
||||
|
||||
|
|
@ -81,12 +82,13 @@ class AIOGramBot:
|
|||
:return:
|
||||
"""
|
||||
|
||||
if reply_markup and hasattr(reply_markup, 'to_json'):
|
||||
reply_markup = json.dumps(reply_markup.to_json())
|
||||
|
||||
if hasattr(reply_to_message_id, 'message_id'):
|
||||
reply_to_message_id = reply_to_message_id.message_id
|
||||
|
||||
payload = generate_payload(**locals())
|
||||
|
||||
if reply_markup:
|
||||
# TODO: convert markup
|
||||
pass
|
||||
|
||||
message = await self.request(ApiMethods.SEND_MESSAGE, payload)
|
||||
return self.prepare_object(Message.de_json(message))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue