ptbtest.inlinequerygenerator module¶
This module provides a class to generate telegram callback queries
-
class
ptbtest.inlinequerygenerator.
InlineQueryGenerator
(bot=None)¶ Bases:
ptbtest.ptbgenerator.PtbGenerator
Callback query generator class.
-
bot
¶ ptbtest.Mockbot – Bot to encode with the messages
Parameters: bot (Optional[ptbtest.Mockbot]) – supply your own for a custom botname -
get_chosen_inline_result
(*args, **kwargs)¶ Returns a telegram.Update object containing a inline_query.
Parameters: - result_id (str) – The result_id belonging to this chosen result
- inline_message_id (Optional[str]) – Of omitted will be generated
- location (Optional[telegram.Location or True]) – simulates a location
- query (Optional[str]) – The query used to send this query
- user (Optional[telegram.User) – If omitted will be randomly generated
Returns: an update containing a
telegram.ChosenInlineResult
Return type:
-
get_inline_query
(*args, **kwargs)¶ Returns a telegram.Update object containing a inline_query.
Parameters: - location (Optional[telegram.Location or True]) – simulates a location
- offset (Optional[str]) –
- query (Optional[str]) –
- user (Optional[telegram.User) – If omitted will be randomly generated
Returns: an update containing a
telegram.InlineQuery
Return type:
-