bot.inline Module

This module contains functions for the inline mode.

bot.inline.MEMBERS_PER_PAGE = 10

Number of members per page in inline mode.

Type

int

bot.inline.REQUEST_CONTACT = 'contact_request {}'

Callback data for requesting the vCard of a member. Use as REQUEST_CONTACT.format(user_id).

Type

str

bot.inline.REQUEST_CONTACT_PATTERN = 'contact_request (\\d*)'

Callback data pattern for requesting the vCard of a member. context.match.group(1) will be users id.

Type

str

bot.inline.SEND_VCARD_HANDLER = <telegram.ext.callbackqueryhandler.CallbackQueryHandler object>

Handler used to send vCards on request.

Type

telegram.ext.CallbackQueryHandler

bot.inline.search_users(update, context)

Searches the orchestras members for a match of the inline query and answers the query. If the query is empty, returns all members in alphabetical order.

Results are paginated with at most MEMBERS_PER_PAGE members per page.

Parameters
  • update (Update) – The update.

  • context (CallbackContext) – The context as provided by the telegram.ext.Dispatcher.

Return type

None

bot.inline.send_vcard(update, context)

Sends the vCard of a Member as requested by the keyboard attached to an inline query result.

Parameters
  • update (Update) – The update.

  • context (CallbackContext) – The context as provided by the telegram.ext.Dispatcher.

Return type

None