mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
Merge pull request #1517 from Badiboy/master
Bugfix in answer_web_app_query
This commit is contained in:
commit
730d11012d
@ -1615,12 +1615,13 @@ def delete_sticker_from_set(token, sticker):
|
|||||||
payload = {'sticker': sticker}
|
payload = {'sticker': sticker}
|
||||||
return _make_request(token, method_url, params=payload, method='post')
|
return _make_request(token, method_url, params=payload, method='post')
|
||||||
|
|
||||||
|
|
||||||
def answer_web_app_query(token, web_app_query_id, result: types.InlineQueryResultBase):
|
def answer_web_app_query(token, web_app_query_id, result: types.InlineQueryResultBase):
|
||||||
method_url = 'answerWebAppQuery'
|
method_url = 'answerWebAppQuery'
|
||||||
result = result.to_json()
|
payload = {'web_app_query_id': web_app_query_id, 'result': result.to_json()}
|
||||||
payload = {'query_id': web_app_query_id, 'result': result}
|
|
||||||
return _make_request(token, method_url, params=payload, method='post')
|
return _make_request(token, method_url, params=payload, method='post')
|
||||||
|
|
||||||
|
|
||||||
# noinspection PyShadowingBuiltins
|
# noinspection PyShadowingBuiltins
|
||||||
def send_poll(
|
def send_poll(
|
||||||
token, chat_id,
|
token, chat_id,
|
||||||
|
@ -1580,8 +1580,6 @@ class AsyncTeleBot:
|
|||||||
result = await asyncio_helper.get_chat_member(self.token, chat_id, user_id)
|
result = await asyncio_helper.get_chat_member(self.token, chat_id, user_id)
|
||||||
return types.ChatMember.de_json(result)
|
return types.ChatMember.de_json(result)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
async def send_message(
|
async def send_message(
|
||||||
self, chat_id: Union[int, str], text: str,
|
self, chat_id: Union[int, str], text: str,
|
||||||
parse_mode: Optional[str]=None,
|
parse_mode: Optional[str]=None,
|
||||||
|
@ -353,10 +353,10 @@ async def delete_chat_sticker_set(token, chat_id):
|
|||||||
payload = {'chat_id': chat_id}
|
payload = {'chat_id': chat_id}
|
||||||
return await _process_request(token, method_url, params=payload)
|
return await _process_request(token, method_url, params=payload)
|
||||||
|
|
||||||
|
|
||||||
async def answer_web_app_query(token, web_app_query_id, result: types.InlineQueryResultBase):
|
async def answer_web_app_query(token, web_app_query_id, result: types.InlineQueryResultBase):
|
||||||
method_url = 'answerWebAppQuery'
|
method_url = 'answerWebAppQuery'
|
||||||
result = result.to_json()
|
payload = {'web_app_query_id': web_app_query_id, 'result': result.to_json()}
|
||||||
payload = {'query_id': web_app_query_id, 'result': result}
|
|
||||||
return await _process_request(token, method_url, params=payload, method='post')
|
return await _process_request(token, method_url, params=payload, method='post')
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user