telegram.inlinequery module¶
This module contains an object that represents a Telegram InlineQuery
-
class
telegram.inlinequery.InlineQuery(id, from_user, query, offset, location=None, bot=None, **kwargs)¶ Bases:
telegram.base.TelegramObjectThis object represents a Telegram InlineQuery.
Note
- In Python from is a reserved word, use from_user instead.
-
id¶ str
-
from_user¶
-
query¶ str
-
offset¶ str
Parameters: - id (int) –
- from_user (
telegram.User) – - query (str) –
- offset (str) –
- location (optional[
telegram.Location]) – - bot (Optional[Bot]) – The Bot to use for instance methods
- **kwargs (dict) – Arbitrary keyword arguments.
-
answer(*args, **kwargs)¶ Shortcut for
bot.answerInlineQuery(update.inline_query.id, *args, **kwargs)
-
static
de_json(data, bot)¶ Parameters: - data (dict) –
- bot (telegram.Bot) –
Returns: Return type:
-
to_dict()¶ Returns: Return type: dict