Expose entity parameter in client.inline_query

Some bots, such as @gamee, use this to determine the type of results
to return (and "disable" themselves in channels).
This commit is contained in:
Lonami Exo
2020-10-11 16:57:38 +02:00
parent d0faaa2ead
commit adf52a1b74
4 changed files with 32 additions and 8 deletions

View File

@@ -44,8 +44,8 @@ class InlineResults(list):
switch to a private conversation with the bot using
the text in this object.
"""
def __init__(self, client, original):
super().__init__(InlineResult(client, x, original.query_id)
def __init__(self, client, original, *, entity=None):
super().__init__(InlineResult(client, x, original.query_id, entity=entity)
for x in original.results)
self.result = original