Add ReplyKeyboardMarkup, KeyboardButton, InlineKeyboardMarkup, InlineKeyboardButton, ForceReply and parse reply_markup

This commit is contained in:
Alex Root Junior 2017-05-26 08:58:07 +03:00
parent 5874291b15
commit 7003b088fc
4 changed files with 126 additions and 5 deletions

View file

@ -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))