pytglib.api.types package¶
Submodules¶
pytglib.api.types.account_ttl module¶
-
class
pytglib.api.types.account_ttl.AccountTtl(days, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains information about the period of inactivity after which the current user’s account will automatically be deleted
- Attributes:
- ID (
str):AccountTtl - Args:
- days (
int): - Number of days of inactivity before the account will be flagged for deletion; 30-366 days
- days (
- Returns:
- AccountTtl
- Raises:
telegram.Error
-
ID= 'accountTtl'¶
-
static
read(q: dict, *args) → pytglib.api.types.account_ttl.AccountTtl¶
pytglib.api.types.address module¶
-
class
pytglib.api.types.address.Address(country_code, state, city, street_line1, street_line2, postal_code, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectDescribes an address
- Attributes:
- ID (
str):Address - Args:
- country_code (
str): - A two-letter ISO 3166-1 alpha-2 country code
- state (
str): - State, if applicable
- city (
str): - City
- street_line1 (
str): - First line of the address
- street_line2 (
str): - Second line of the address
- postal_code (
str): - Address postal code
- country_code (
- Returns:
- Address
- Raises:
telegram.Error
-
ID= 'address'¶
-
static
read(q: dict, *args) → pytglib.api.types.address.Address¶
pytglib.api.types.animation module¶
-
class
pytglib.api.types.animation.Animation(duration, width, height, file_name, mime_type, has_stickers, minithumbnail, thumbnail, animation, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectDescribes an animation file. The animation must be encoded in GIF or MPEG4 format
- Attributes:
- ID (
str):Animation - Args:
- duration (
int): - Duration of the animation, in seconds; as defined by the sender
- width (
int): - Width of the animation
- height (
int): - Height of the animation
- file_name (
str): - Original name of the file; as defined by the sender
- mime_type (
str): - MIME type of the file, usually “image/gif” or “video/mp4”
- has_stickers (
bool): - True, if stickers were added to the animationThe list of corresponding sticker set can be received using getAttachedStickerSets
- minithumbnail (
telegram.api.types.minithumbnail): - Animation minithumbnail; may be null
- thumbnail (
telegram.api.types.thumbnail): - Animation thumbnail in JPEG or MPEG4 format; may be null
- animation (
telegram.api.types.file): - File containing the animation
- duration (
- Returns:
- Animation
- Raises:
telegram.Error
-
ID= 'animation'¶
-
static
read(q: dict, *args) → pytglib.api.types.animation.Animation¶
pytglib.api.types.animations module¶
-
class
pytglib.api.types.animations.Animations(animations, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents a list of animations
- Attributes:
- ID (
str):Animations - Args:
- animations (List of
telegram.api.types.animation): - List of animations
- animations (List of
- Returns:
- Animations
- Raises:
telegram.Error
-
ID= 'animations'¶
-
static
read(q: dict, *args) → pytglib.api.types.animations.Animations¶
pytglib.api.types.audio module¶
-
class
pytglib.api.types.audio.Audio(duration, title, performer, file_name, mime_type, album_cover_minithumbnail, album_cover_thumbnail, audio, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectDescribes an audio file. Audio is usually in MP3 or M4A format
- Attributes:
- ID (
str):Audio - Args:
- duration (
int): - Duration of the audio, in seconds; as defined by the sender
- title (
str): - Title of the audio; as defined by the sender
- performer (
str): - Performer of the audio; as defined by the sender
- file_name (
str): - Original name of the file; as defined by the sender
- mime_type (
str): - The MIME type of the file; as defined by the sender
- album_cover_minithumbnail (
telegram.api.types.minithumbnail): - The minithumbnail of the album cover; may be null
- album_cover_thumbnail (
telegram.api.types.thumbnail): - The thumbnail of the album cover in JPEG format; as defined by the senderThe full size thumbnail is supposed to be extracted from the downloaded file; may be null
- audio (
telegram.api.types.file): - File containing the audio
- duration (
- Returns:
- Audio
- Raises:
telegram.Error
-
ID= 'audio'¶
-
static
read(q: dict, *args) → pytglib.api.types.audio.Audio¶
pytglib.api.types.authentication_code_info module¶
-
class
pytglib.api.types.authentication_code_info.AuthenticationCodeInfo(phone_number, type, next_type, timeout, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectInformation about the authentication code that was sent
- Attributes:
- ID (
str):AuthenticationCodeInfo - Args:
- phone_number (
str): - A phone number that is being authenticated
- type (
telegram.api.types.AuthenticationCodeType): - The way the code was sent to the user
- next_type (
telegram.api.types.AuthenticationCodeType): - The way the next code will be sent to the user; may be null
- timeout (
int): - Timeout before the code can be re-sent, in seconds
- phone_number (
- Returns:
- AuthenticationCodeInfo
- Raises:
telegram.Error
-
ID= 'authenticationCodeInfo'¶
-
static
read(q: dict, *args) → pytglib.api.types.authentication_code_info.AuthenticationCodeInfo¶
pytglib.api.types.authentication_code_type module¶
-
class
pytglib.api.types.authentication_code_type.AuthenticationCodeType(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectProvides information about the method by which an authentication code is delivered to the user
No parameters required.
-
ID= 'authenticationCodeType'¶
-
static
read(q: dict, *args) → AuthenticationCodeTypeSms or AuthenticationCodeTypeFlashCall or AuthenticationCodeTypeTelegramMessage or AuthenticationCodeTypeCall or AuthenticationCodeTypeMissedCall¶
-
pytglib.api.types.authentication_code_type_call module¶
-
class
pytglib.api.types.authentication_code_type_call.AuthenticationCodeTypeCall(length, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectAn authentication code is delivered via a phone call to the specified phone number
- Attributes:
- ID (
str):AuthenticationCodeTypeCall - Args:
- length (
int): - Length of the code
- length (
- Returns:
- AuthenticationCodeType
- Raises:
telegram.Error
-
ID= 'authenticationCodeTypeCall'¶
-
static
read(q: dict, *args) → pytglib.api.types.authentication_code_type_call.AuthenticationCodeTypeCall¶
pytglib.api.types.authentication_code_type_flash_call module¶
-
class
pytglib.api.types.authentication_code_type_flash_call.AuthenticationCodeTypeFlashCall(pattern, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectAn authentication code is delivered by an immediately canceled call to the specified phone number. The phone number that calls is the code that must be entered automatically
- Attributes:
- ID (
str):AuthenticationCodeTypeFlashCall - Args:
- pattern (
str): - Pattern of the phone number from which the call will be made
- pattern (
- Returns:
- AuthenticationCodeType
- Raises:
telegram.Error
-
ID= 'authenticationCodeTypeFlashCall'¶
-
static
read(q: dict, *args) → pytglib.api.types.authentication_code_type_flash_call.AuthenticationCodeTypeFlashCall¶
pytglib.api.types.authentication_code_type_sms module¶
-
class
pytglib.api.types.authentication_code_type_sms.AuthenticationCodeTypeSms(length, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectAn authentication code is delivered via an SMS message to the specified phone number
- Attributes:
- ID (
str):AuthenticationCodeTypeSms - Args:
- length (
int): - Length of the code
- length (
- Returns:
- AuthenticationCodeType
- Raises:
telegram.Error
-
ID= 'authenticationCodeTypeSms'¶
-
static
read(q: dict, *args) → pytglib.api.types.authentication_code_type_sms.AuthenticationCodeTypeSms¶
pytglib.api.types.authentication_code_type_telegram_message module¶
-
class
pytglib.api.types.authentication_code_type_telegram_message.AuthenticationCodeTypeTelegramMessage(length, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectAn authentication code is delivered via a private Telegram message, which can be viewed from another active session
- Attributes:
- ID (
str):AuthenticationCodeTypeTelegramMessage - Args:
- length (
int): - Length of the code
- length (
- Returns:
- AuthenticationCodeType
- Raises:
telegram.Error
-
ID= 'authenticationCodeTypeTelegramMessage'¶
-
static
read(q: dict, *args) → pytglib.api.types.authentication_code_type_telegram_message.AuthenticationCodeTypeTelegramMessage¶
pytglib.api.types.authorization_state module¶
Bases:
pytglib.api.utils.object.ObjectRepresents the current authorization state of the TDLib client
No parameters required.
pytglib.api.types.authorization_state_closed module¶
Bases:
pytglib.api.utils.object.ObjectTDLib client is in its final state. All databases are closed and all resources are released. No other updates will be received after this. All queries will be responded towith error code 500. To continue working, one must create a new instance of the TDLib client
- Attributes:
- ID (
str):AuthorizationStateClosed
No parameters required.
- Returns:
- AuthorizationState
- Raises:
telegram.Error
pytglib.api.types.authorization_state_closing module¶
Bases:
pytglib.api.utils.object.ObjectTDLib is closing, all subsequent queries will be answered with the error 500. Note that closing TDLib can take a while. All resources will be freed only after authorizationStateClosed has been received
- Attributes:
- ID (
str):AuthorizationStateClosing
No parameters required.
- Returns:
- AuthorizationState
- Raises:
telegram.Error
pytglib.api.types.authorization_state_logging_out module¶
Bases:
pytglib.api.utils.object.ObjectThe user is currently logging out
- Attributes:
- ID (
str):AuthorizationStateLoggingOut
No parameters required.
- Returns:
- AuthorizationState
- Raises:
telegram.Error
pytglib.api.types.authorization_state_ready module¶
Bases:
pytglib.api.utils.object.ObjectThe user has been successfully authorized. TDLib is now ready to answer queries
- Attributes:
- ID (
str):AuthorizationStateReady
No parameters required.
- Returns:
- AuthorizationState
- Raises:
telegram.Error
pytglib.api.types.authorization_state_wait_code module¶
Bases:
pytglib.api.utils.object.ObjectTDLib needs the user’s authentication code to authorize
- Attributes:
- ID (
str):AuthorizationStateWaitCode - Args:
- code_info (
telegram.api.types.authenticationCodeInfo): - Information about the authorization code that was sent
- code_info (
- Returns:
- AuthorizationState
- Raises:
telegram.Error
pytglib.api.types.authorization_state_wait_encryption_key module¶
Bases:
pytglib.api.utils.object.ObjectTDLib needs an encryption key to decrypt the local database
- Attributes:
- ID (
str):AuthorizationStateWaitEncryptionKey - Args:
- is_encrypted (
bool): - True, if the database is currently encrypted
- is_encrypted (
- Returns:
- AuthorizationState
- Raises:
telegram.Error
pytglib.api.types.authorization_state_wait_other_device_confirmation module¶
Bases:
pytglib.api.utils.object.ObjectThe user needs to confirm authorization on another logged in device by scanning a QR code with the provided link
- Attributes:
- ID (
str):AuthorizationStateWaitOtherDeviceConfirmation - Args:
- link (
str): - A tg:// URL for the QR codeThe link will be updated frequently
- link (
- Returns:
- AuthorizationState
- Raises:
telegram.Error
pytglib.api.types.authorization_state_wait_password module¶
Bases:
pytglib.api.utils.object.ObjectThe user has been authorized, but needs to enter a password to start using the application
- Attributes:
- ID (
str):AuthorizationStateWaitPassword - Args:
- password_hint (
str): - Hint for the password; may be empty
- has_recovery_email_address (
bool): - True, if a recovery email address has been set up
- recovery_email_address_pattern (
str): - Pattern of the email address to which the recovery email was sent; empty until a recovery email has been sent
- password_hint (
- Returns:
- AuthorizationState
- Raises:
telegram.Error
pytglib.api.types.authorization_state_wait_phone_number module¶
Bases:
pytglib.api.utils.object.ObjectTDLib needs the user’s phone number to authorize. Call setAuthenticationPhoneNumber to provide the phone number, or use requestQrCodeAuthentication, or checkAuthenticationBotToken for other authentication options
- Attributes:
- ID (
str):AuthorizationStateWaitPhoneNumber
No parameters required.
- Returns:
- AuthorizationState
- Raises:
telegram.Error
pytglib.api.types.authorization_state_wait_registration module¶
Bases:
pytglib.api.utils.object.ObjectThe user is unregistered and need to accept terms of service and enter their first name and last name to finish registration
- Attributes:
- ID (
str):AuthorizationStateWaitRegistration - Args:
- terms_of_service (
telegram.api.types.termsOfService): - Telegram terms of service
- terms_of_service (
- Returns:
- AuthorizationState
- Raises:
telegram.Error
pytglib.api.types.authorization_state_wait_tdlib_parameters module¶
Bases:
pytglib.api.utils.object.ObjectTDLib needs TdlibParameters for initialization
- Attributes:
- ID (
str):AuthorizationStateWaitTdlibParameters
No parameters required.
- Returns:
- AuthorizationState
- Raises:
telegram.Error
pytglib.api.types.auto_download_settings module¶
-
class
pytglib.api.types.auto_download_settings.AutoDownloadSettings(is_auto_download_enabled, max_photo_file_size, max_video_file_size, max_other_file_size, video_upload_bitrate, preload_large_videos, preload_next_audio, use_less_data_for_calls, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains auto-download settings
- Attributes:
- ID (
str):AutoDownloadSettings - Args:
- is_auto_download_enabled (
bool): - True, if the auto-download is enabled
- max_photo_file_size (
int): - The maximum size of a photo file to be auto-downloaded, in bytes
- max_video_file_size (
int): - The maximum size of a video file to be auto-downloaded, in bytes
- max_other_file_size (
int): - The maximum size of other file types to be auto-downloaded, in bytes
- video_upload_bitrate (
int): - The maximum suggested bitrate for uploaded videos, in kbit/s
- preload_large_videos (
bool): - True, if the beginning of video files needs to be preloaded for instant playback
- preload_next_audio (
bool): - True, if the next audio track needs to be preloaded while the user is listening to an audio file
- use_less_data_for_calls (
bool): - True, if “use less data for calls” option needs to be enabled
- is_auto_download_enabled (
- Returns:
- AutoDownloadSettings
- Raises:
telegram.Error
-
ID= 'autoDownloadSettings'¶
-
static
read(q: dict, *args) → pytglib.api.types.auto_download_settings.AutoDownloadSettings¶
pytglib.api.types.auto_download_settings_presets module¶
-
class
pytglib.api.types.auto_download_settings_presets.AutoDownloadSettingsPresets(low, medium, high, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains auto-download settings presets for the current user
- Attributes:
- ID (
str):AutoDownloadSettingsPresets - Args:
- low (
telegram.api.types.autoDownloadSettings): - Preset with lowest settings; supposed to be used by default when roaming
- medium (
telegram.api.types.autoDownloadSettings): - Preset with medium settings; supposed to be used by default when using mobile data
- high (
telegram.api.types.autoDownloadSettings): - Preset with highest settings; supposed to be used by default when connected on Wi-Fi
- low (
- Returns:
- AutoDownloadSettingsPresets
- Raises:
telegram.Error
-
ID= 'autoDownloadSettingsPresets'¶
-
static
read(q: dict, *args) → pytglib.api.types.auto_download_settings_presets.AutoDownloadSettingsPresets¶
pytglib.api.types.background module¶
-
class
pytglib.api.types.background.Background(id, is_default, is_dark, name, document, type, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectDescribes a chat background
- Attributes:
- ID (
str):Background - Args:
- id (
int): - Unique background identifier
- is_default (
bool): - True, if this is one of default backgrounds
- is_dark (
bool): - True, if the background is dark and is recommended to be used with dark theme
- name (
str): - Unique background name
- document (
telegram.api.types.document): - Document with the background; may be nullNull only for filled backgrounds
- type (
telegram.api.types.BackgroundType): - Type of the background
- id (
- Returns:
- Background
- Raises:
telegram.Error
-
ID= 'background'¶
-
static
read(q: dict, *args) → pytglib.api.types.background.Background¶
pytglib.api.types.background_fill module¶
-
class
pytglib.api.types.background_fill.BackgroundFill(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectDescribes a fill of a background
No parameters required.
-
ID= 'backgroundFill'¶
-
static
read(q: dict, *args) → BackgroundFillGradient or BackgroundFillSolid or BackgroundFillFreeformGradient¶
-
pytglib.api.types.background_fill_gradient module¶
-
class
pytglib.api.types.background_fill_gradient.BackgroundFillGradient(top_color, bottom_color, rotation_angle, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectDescribes a gradient fill of a background
- Attributes:
- ID (
str):BackgroundFillGradient - Args:
- top_color (
int): - A top color of the background in the RGB24 format
- bottom_color (
int): - A bottom color of the background in the RGB24 format
- rotation_angle (
int): - Clockwise rotation angle of the gradient, in degrees; 0-359Must be always divisible by 45
- top_color (
- Returns:
- BackgroundFill
- Raises:
telegram.Error
-
ID= 'backgroundFillGradient'¶
-
static
read(q: dict, *args) → pytglib.api.types.background_fill_gradient.BackgroundFillGradient¶
pytglib.api.types.background_fill_solid module¶
-
class
pytglib.api.types.background_fill_solid.BackgroundFillSolid(color, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectDescribes a solid fill of a background
- Attributes:
- ID (
str):BackgroundFillSolid - Args:
- color (
int): - A color of the background in the RGB24 format
- color (
- Returns:
- BackgroundFill
- Raises:
telegram.Error
-
ID= 'backgroundFillSolid'¶
-
static
read(q: dict, *args) → pytglib.api.types.background_fill_solid.BackgroundFillSolid¶
pytglib.api.types.background_type module¶
-
class
pytglib.api.types.background_type.BackgroundType(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectDescribes the type of a background
No parameters required.
-
ID= 'backgroundType'¶
-
static
read(q: dict, *args) → BackgroundTypeWallpaper or BackgroundTypeFill or BackgroundTypePattern¶
-
pytglib.api.types.background_type_fill module¶
-
class
pytglib.api.types.background_type_fill.BackgroundTypeFill(fill, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA filled background
- Attributes:
- ID (
str):BackgroundTypeFill - Args:
- fill (
telegram.api.types.BackgroundFill): - The background fill
- fill (
- Returns:
- BackgroundType
- Raises:
telegram.Error
-
ID= 'backgroundTypeFill'¶
-
static
read(q: dict, *args) → pytglib.api.types.background_type_fill.BackgroundTypeFill¶
pytglib.api.types.background_type_pattern module¶
-
class
pytglib.api.types.background_type_pattern.BackgroundTypePattern(fill, intensity, is_inverted, is_moving, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA PNG or TGV (gzipped subset of SVG with MIME type “application/x-tgwallpattern”) pattern to be combined with the background fill chosen by the user
- Attributes:
- ID (
str):BackgroundTypePattern - Args:
- fill (
telegram.api.types.BackgroundFill): - Fill of the background
- intensity (
int): - Intensity of the pattern when it is shown above the filled background; 0-100
- is_inverted (
bool): - True, if the background fill must be applied only to the pattern itselfAll other pixels are black in this caseFor dark themes only
- is_moving (
bool): - True, if the background needs to be slightly moved when device is tilted
- fill (
- Returns:
- BackgroundType
- Raises:
telegram.Error
-
ID= 'backgroundTypePattern'¶
-
static
read(q: dict, *args) → pytglib.api.types.background_type_pattern.BackgroundTypePattern¶
pytglib.api.types.background_type_wallpaper module¶
-
class
pytglib.api.types.background_type_wallpaper.BackgroundTypeWallpaper(is_blurred, is_moving, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA wallpaper in JPEG format
- Attributes:
- ID (
str):BackgroundTypeWallpaper - Args:
- is_blurred (
bool): - True, if the wallpaper must be downscaled to fit in 450x450 square and then box-blurred with radius 12
- is_moving (
bool): - True, if the background needs to be slightly moved when device is tilted
- is_blurred (
- Returns:
- BackgroundType
- Raises:
telegram.Error
-
ID= 'backgroundTypeWallpaper'¶
-
static
read(q: dict, *args) → pytglib.api.types.background_type_wallpaper.BackgroundTypeWallpaper¶
pytglib.api.types.backgrounds module¶
-
class
pytglib.api.types.backgrounds.Backgrounds(backgrounds, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains a list of backgrounds
- Attributes:
- ID (
str):Backgrounds - Args:
- backgrounds (List of
telegram.api.types.background): - A list of backgrounds
- backgrounds (List of
- Returns:
- Backgrounds
- Raises:
telegram.Error
-
ID= 'backgrounds'¶
-
static
read(q: dict, *args) → pytglib.api.types.backgrounds.Backgrounds¶
pytglib.api.types.bank_card_action_open_url module¶
-
class
pytglib.api.types.bank_card_action_open_url.BankCardActionOpenUrl(text, url, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectDescribes an action associated with a bank card number
- Attributes:
- ID (
str):BankCardActionOpenUrl - Args:
- text (
str): - Action text
- url (
str): - The URL to be opened
- text (
- Returns:
- BankCardActionOpenUrl
- Raises:
telegram.Error
-
ID= 'bankCardActionOpenUrl'¶
-
static
read(q: dict, *args) → pytglib.api.types.bank_card_action_open_url.BankCardActionOpenUrl¶
pytglib.api.types.bank_card_info module¶
-
class
pytglib.api.types.bank_card_info.BankCardInfo(title, actions, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectInformation about a bank card
- Attributes:
- ID (
str):BankCardInfo - Args:
- title (
str): - Title of the bank card description
- actions (List of
telegram.api.types.bankCardActionOpenUrl): - Actions that can be done with the bank card number
- title (
- Returns:
- BankCardInfo
- Raises:
telegram.Error
-
ID= 'bankCardInfo'¶
-
static
read(q: dict, *args) → pytglib.api.types.bank_card_info.BankCardInfo¶
pytglib.api.types.basic_group module¶
-
class
pytglib.api.types.basic_group.BasicGroup(id, member_count, status, is_active, upgraded_to_supergroup_id, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents a basic group of 0-200 users (must be upgraded to a supergroup to accommodate more than 200 users)
- Attributes:
- ID (
str):BasicGroup - Args:
- id (
int): - Group identifier
- member_count (
int): - Number of members in the group
- status (
telegram.api.types.ChatMemberStatus): - Status of the current user in the group
- is_active (
bool): - True, if the group is active
- upgraded_to_supergroup_id (
int): - Identifier of the supergroup to which this group was upgraded; 0 if none
- id (
- Returns:
- BasicGroup
- Raises:
telegram.Error
-
ID= 'basicGroup'¶
-
static
read(q: dict, *args) → pytglib.api.types.basic_group.BasicGroup¶
pytglib.api.types.basic_group_full_info module¶
-
class
pytglib.api.types.basic_group_full_info.BasicGroupFullInfo(photo, description, creator_user_id, members, invite_link, bot_commands, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains full information about a basic group
- Attributes:
- ID (
str):BasicGroupFullInfo - Args:
- photo (
telegram.api.types.chatPhoto): - Chat photo; may be null
- description (
str): - Group descriptionUpdated only after the basic group is opened
- creator_user_id (
int): - User identifier of the creator of the group; 0 if unknown
- members (List of
telegram.api.types.chatMember): - Group members
- invite_link (
telegram.api.types.chatInviteLink): - Primary invite link for this group; may be nullFor chat administrators with can_invite_users right onlyUpdated only after the basic group is opened
- bot_commands (List of
telegram.api.types.botCommands): - List of commands of bots in the group
- photo (
- Returns:
- BasicGroupFullInfo
- Raises:
telegram.Error
-
ID= 'basicGroupFullInfo'¶
-
static
read(q: dict, *args) → pytglib.api.types.basic_group_full_info.BasicGroupFullInfo¶
pytglib.api.types.bot_command module¶
-
class
pytglib.api.types.bot_command.BotCommand(command, description, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents a command supported by a bot
- Attributes:
- ID (
str):BotCommand - Args:
- command (
str): - Text of the bot command
- description (
str): - Description of the bot command
- command (
- Returns:
- BotCommand
- Raises:
telegram.Error
-
ID= 'botCommand'¶
-
static
read(q: dict, *args) → pytglib.api.types.bot_command.BotCommand¶
pytglib.api.types.bot_info module¶
-
class
pytglib.api.types.bot_info.BotInfo(share_text, description, photo, animation, menu_button, commands, default_group_administrator_rights, default_channel_administrator_rights, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains information about a bot
- Attributes:
- ID (
str):BotInfo - Args:
- share_text (
str): - The text that is shown on the bot’s profile page and is sent together with the link when users share the bot
- description (
str): - The text shown in the chat with the bot if the chat is empty
- photo (
telegram.api.types.photo): - Photo shown in the chat with the bot if the chat is empty; may be null
- animation (
telegram.api.types.animation): - Animation shown in the chat with the bot if the chat is empty; may be null
- menu_button (
telegram.api.types.botMenuButton): - Information about a button to show instead of the bot commands menu button; may be null if ordinary bot commands menu must be shown
- commands (List of
telegram.api.types.botCommand): - List of the bot commands
- default_group_administrator_rights (
telegram.api.types.chatAdministratorRights): - Default administrator rights for adding the bot to basic group and supergroup chats; may be null
- default_channel_administrator_rights (
telegram.api.types.chatAdministratorRights): - Default administrator rights for adding the bot to channels; may be null
- share_text (
- Returns:
- BotInfo
- Raises:
telegram.Error
-
ID= 'botInfo'¶
-
static
read(q: dict, *args) → pytglib.api.types.bot_info.BotInfo¶
pytglib.api.types.call module¶
-
class
pytglib.api.types.call.Call(id, user_id, is_outgoing, is_video, state, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectDescribes a call
- Attributes:
- ID (
str):Call - Args:
- id (
int): - Call identifier, not persistent
- user_id (
int): - Peer user identifier
- is_outgoing (
bool): - True, if the call is outgoing
- is_video (
bool): - True, if the call is a video call
- state (
telegram.api.types.CallState): - Call state
- id (
- Returns:
- Call
- Raises:
telegram.Error
-
ID= 'call'¶
-
static
read(q: dict, *args) → pytglib.api.types.call.Call¶
pytglib.api.types.call_connection module¶
pytglib.api.types.call_discard_reason module¶
-
class
pytglib.api.types.call_discard_reason.CallDiscardReason(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectDescribes the reason why a call was discarded
No parameters required.
-
ID= 'callDiscardReason'¶
-
static
read(q: dict, *args) → CallDiscardReasonEmpty or CallDiscardReasonDisconnected or CallDiscardReasonMissed or CallDiscardReasonHungUp or CallDiscardReasonDeclined¶
-
pytglib.api.types.call_discard_reason_declined module¶
-
class
pytglib.api.types.call_discard_reason_declined.CallDiscardReasonDeclined(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe call was ended before the conversation started. It was declined by the other party
- Attributes:
- ID (
str):CallDiscardReasonDeclined
No parameters required.
- Returns:
- CallDiscardReason
- Raises:
telegram.Error
-
ID= 'callDiscardReasonDeclined'¶
-
static
read(q: dict, *args) → pytglib.api.types.call_discard_reason_declined.CallDiscardReasonDeclined¶
pytglib.api.types.call_discard_reason_disconnected module¶
-
class
pytglib.api.types.call_discard_reason_disconnected.CallDiscardReasonDisconnected(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe call was ended during the conversation because the users were disconnected
- Attributes:
- ID (
str):CallDiscardReasonDisconnected
No parameters required.
- Returns:
- CallDiscardReason
- Raises:
telegram.Error
-
ID= 'callDiscardReasonDisconnected'¶
-
static
read(q: dict, *args) → pytglib.api.types.call_discard_reason_disconnected.CallDiscardReasonDisconnected¶
pytglib.api.types.call_discard_reason_empty module¶
-
class
pytglib.api.types.call_discard_reason_empty.CallDiscardReasonEmpty(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe call wasn’t discarded, or the reason is unknown
- Attributes:
- ID (
str):CallDiscardReasonEmpty
No parameters required.
- Returns:
- CallDiscardReason
- Raises:
telegram.Error
-
ID= 'callDiscardReasonEmpty'¶
-
static
read(q: dict, *args) → pytglib.api.types.call_discard_reason_empty.CallDiscardReasonEmpty¶
pytglib.api.types.call_discard_reason_hung_up module¶
-
class
pytglib.api.types.call_discard_reason_hung_up.CallDiscardReasonHungUp(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe call was ended because one of the parties hung up
- Attributes:
- ID (
str):CallDiscardReasonHungUp
No parameters required.
- Returns:
- CallDiscardReason
- Raises:
telegram.Error
-
ID= 'callDiscardReasonHungUp'¶
-
static
read(q: dict, *args) → pytglib.api.types.call_discard_reason_hung_up.CallDiscardReasonHungUp¶
pytglib.api.types.call_discard_reason_missed module¶
-
class
pytglib.api.types.call_discard_reason_missed.CallDiscardReasonMissed(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe call was ended before the conversation started. It was canceled by the caller or missed by the other party
- Attributes:
- ID (
str):CallDiscardReasonMissed
No parameters required.
- Returns:
- CallDiscardReason
- Raises:
telegram.Error
-
ID= 'callDiscardReasonMissed'¶
-
static
read(q: dict, *args) → pytglib.api.types.call_discard_reason_missed.CallDiscardReasonMissed¶
pytglib.api.types.call_id module¶
-
class
pytglib.api.types.call_id.CallId(id, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains the call identifier
- Attributes:
- ID (
str):CallId - Args:
- id (
int): - Call identifier
- id (
- Returns:
- CallId
- Raises:
telegram.Error
-
ID= 'callId'¶
-
static
read(q: dict, *args) → pytglib.api.types.call_id.CallId¶
pytglib.api.types.call_problem module¶
-
class
pytglib.api.types.call_problem.CallProblem(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectDescribes the exact type of a problem with a call
No parameters required.
-
ID= 'callProblem'¶
-
static
read(q: dict, *args) → CallProblemSilentLocal or CallProblemPixelatedVideo or CallProblemDropped or CallProblemNoise or CallProblemEcho or CallProblemDistortedSpeech or CallProblemInterruptions or CallProblemSilentRemote or CallProblemDistortedVideo¶
-
pytglib.api.types.call_problem_distorted_speech module¶
-
class
pytglib.api.types.call_problem_distorted_speech.CallProblemDistortedSpeech(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe speech was distorted
- Attributes:
- ID (
str):CallProblemDistortedSpeech
No parameters required.
- Returns:
- CallProblem
- Raises:
telegram.Error
-
ID= 'callProblemDistortedSpeech'¶
-
static
read(q: dict, *args) → pytglib.api.types.call_problem_distorted_speech.CallProblemDistortedSpeech¶
pytglib.api.types.call_problem_dropped module¶
-
class
pytglib.api.types.call_problem_dropped.CallProblemDropped(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe call ended unexpectedly
- Attributes:
- ID (
str):CallProblemDropped
No parameters required.
- Returns:
- CallProblem
- Raises:
telegram.Error
-
ID= 'callProblemDropped'¶
-
static
read(q: dict, *args) → pytglib.api.types.call_problem_dropped.CallProblemDropped¶
pytglib.api.types.call_problem_echo module¶
-
class
pytglib.api.types.call_problem_echo.CallProblemEcho(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe user heard their own voice
- Attributes:
- ID (
str):CallProblemEcho
No parameters required.
- Returns:
- CallProblem
- Raises:
telegram.Error
-
ID= 'callProblemEcho'¶
-
static
read(q: dict, *args) → pytglib.api.types.call_problem_echo.CallProblemEcho¶
pytglib.api.types.call_problem_interruptions module¶
-
class
pytglib.api.types.call_problem_interruptions.CallProblemInterruptions(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe other side kept disappearing
- Attributes:
- ID (
str):CallProblemInterruptions
No parameters required.
- Returns:
- CallProblem
- Raises:
telegram.Error
-
ID= 'callProblemInterruptions'¶
-
static
read(q: dict, *args) → pytglib.api.types.call_problem_interruptions.CallProblemInterruptions¶
pytglib.api.types.call_problem_noise module¶
-
class
pytglib.api.types.call_problem_noise.CallProblemNoise(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe user heard background noise
- Attributes:
- ID (
str):CallProblemNoise
No parameters required.
- Returns:
- CallProblem
- Raises:
telegram.Error
-
ID= 'callProblemNoise'¶
-
static
read(q: dict, *args) → pytglib.api.types.call_problem_noise.CallProblemNoise¶
pytglib.api.types.call_problem_silent_local module¶
-
class
pytglib.api.types.call_problem_silent_local.CallProblemSilentLocal(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe user couldn’t hear the other side
- Attributes:
- ID (
str):CallProblemSilentLocal
No parameters required.
- Returns:
- CallProblem
- Raises:
telegram.Error
-
ID= 'callProblemSilentLocal'¶
-
static
read(q: dict, *args) → pytglib.api.types.call_problem_silent_local.CallProblemSilentLocal¶
pytglib.api.types.call_problem_silent_remote module¶
-
class
pytglib.api.types.call_problem_silent_remote.CallProblemSilentRemote(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe other side couldn’t hear the user
- Attributes:
- ID (
str):CallProblemSilentRemote
No parameters required.
- Returns:
- CallProblem
- Raises:
telegram.Error
-
ID= 'callProblemSilentRemote'¶
-
static
read(q: dict, *args) → pytglib.api.types.call_problem_silent_remote.CallProblemSilentRemote¶
pytglib.api.types.call_protocol module¶
-
class
pytglib.api.types.call_protocol.CallProtocol(udp_p2p, udp_reflector, min_layer, max_layer, library_versions, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectSpecifies the supported call protocols
- Attributes:
- ID (
str):CallProtocol - Args:
- udp_p2p (
bool): - True, if UDP peer-to-peer connections are supported
- udp_reflector (
bool): - True, if connection through UDP reflectors is supported
- min_layer (
int): - The minimum supported API layer; use 65
- max_layer (
int): - The maximum supported API layer; use 65
- library_versions (List of
str): - List of supported tgcalls versions
- udp_p2p (
- Returns:
- CallProtocol
- Raises:
telegram.Error
-
ID= 'callProtocol'¶
-
static
read(q: dict, *args) → pytglib.api.types.call_protocol.CallProtocol¶
pytglib.api.types.call_state module¶
-
class
pytglib.api.types.call_state.CallState(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectDescribes the current call state
No parameters required.
-
ID= 'callState'¶
-
static
read(q: dict, *args) → CallStateExchangingKeys or CallStateReady or CallStatePending or CallStateDiscarded or CallStateHangingUp or CallStateError¶
-
pytglib.api.types.call_state_discarded module¶
-
class
pytglib.api.types.call_state_discarded.CallStateDiscarded(reason, need_rating, need_debug_information, need_log, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe call has ended successfully
- Attributes:
- ID (
str):CallStateDiscarded - Args:
- reason (
telegram.api.types.CallDiscardReason): - The reason, why the call has ended
- need_rating (
bool): - True, if the call rating must be sent to the server
- need_debug_information (
bool): - True, if the call debug information must be sent to the server
- need_log (
bool): - True, if the call log must be sent to the server
- reason (
- Returns:
- CallState
- Raises:
telegram.Error
-
ID= 'callStateDiscarded'¶
-
static
read(q: dict, *args) → pytglib.api.types.call_state_discarded.CallStateDiscarded¶
pytglib.api.types.call_state_error module¶
-
class
pytglib.api.types.call_state_error.CallStateError(error, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe call has ended with an error
- Attributes:
- ID (
str):CallStateError - Args:
- error (
telegram.api.types.error): - ErrorAn error with the code 4005000 will be returned if an outgoing call is missed because of an expired timeout
- error (
- Returns:
- CallState
- Raises:
telegram.Error
-
ID= 'callStateError'¶
-
static
read(q: dict, *args) → pytglib.api.types.call_state_error.CallStateError¶
pytglib.api.types.call_state_exchanging_keys module¶
-
class
pytglib.api.types.call_state_exchanging_keys.CallStateExchangingKeys(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe call has been answered and encryption keys are being exchanged
- Attributes:
- ID (
str):CallStateExchangingKeys
No parameters required.
- Returns:
- CallState
- Raises:
telegram.Error
-
ID= 'callStateExchangingKeys'¶
-
static
read(q: dict, *args) → pytglib.api.types.call_state_exchanging_keys.CallStateExchangingKeys¶
pytglib.api.types.call_state_hanging_up module¶
-
class
pytglib.api.types.call_state_hanging_up.CallStateHangingUp(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe call is hanging up after discardCall has been called
- Attributes:
- ID (
str):CallStateHangingUp
No parameters required.
- Returns:
- CallState
- Raises:
telegram.Error
-
ID= 'callStateHangingUp'¶
-
static
read(q: dict, *args) → pytglib.api.types.call_state_hanging_up.CallStateHangingUp¶
pytglib.api.types.call_state_pending module¶
-
class
pytglib.api.types.call_state_pending.CallStatePending(is_created, is_received, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe call is pending, waiting to be accepted by a user
- Attributes:
- ID (
str):CallStatePending - Args:
- is_created (
bool): - True, if the call has already been created by the server
- is_received (
bool): - True, if the call has already been received by the other party
- is_created (
- Returns:
- CallState
- Raises:
telegram.Error
-
ID= 'callStatePending'¶
-
static
read(q: dict, *args) → pytglib.api.types.call_state_pending.CallStatePending¶
pytglib.api.types.call_state_ready module¶
-
class
pytglib.api.types.call_state_ready.CallStateReady(protocol, servers, config, encryption_key, emojis, allow_p2p, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe call is ready to use
- Attributes:
- ID (
str):CallStateReady - Args:
- protocol (
telegram.api.types.callProtocol): - Call protocols supported by the peer
- servers (List of
telegram.api.types.callServer): - List of available call servers
- config (
str): - A JSON-encoded call config
- encryption_key (
bytes): - Call encryption key
- emojis (List of
str): - Encryption key emojis fingerprint
- allow_p2p (
bool): - True, if peer-to-peer connection is allowed by users privacy settings
- protocol (
- Returns:
- CallState
- Raises:
telegram.Error
-
ID= 'callStateReady'¶
-
static
read(q: dict, *args) → pytglib.api.types.call_state_ready.CallStateReady¶
pytglib.api.types.callback_query_answer module¶
-
class
pytglib.api.types.callback_query_answer.CallbackQueryAnswer(text, show_alert, url, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains a bot’s answer to a callback query
- Attributes:
- ID (
str):CallbackQueryAnswer - Args:
- text (
str): - Text of the answer
- show_alert (
bool): - True, if an alert must be shown to the user instead of a toast notification
- url (
str): - URL to be opened
- text (
- Returns:
- CallbackQueryAnswer
- Raises:
telegram.Error
-
ID= 'callbackQueryAnswer'¶
-
static
read(q: dict, *args) → pytglib.api.types.callback_query_answer.CallbackQueryAnswer¶
pytglib.api.types.callback_query_payload module¶
-
class
pytglib.api.types.callback_query_payload.CallbackQueryPayload(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents a payload of a callback query
No parameters required.
-
ID= 'callbackQueryPayload'¶
-
static
read(q: dict, *args) → CallbackQueryPayloadGame or CallbackQueryPayloadDataWithPassword or CallbackQueryPayloadData¶
-
pytglib.api.types.callback_query_payload_data module¶
-
class
pytglib.api.types.callback_query_payload_data.CallbackQueryPayloadData(data, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe payload for a general callback button
- Attributes:
- ID (
str):CallbackQueryPayloadData - Args:
- data (
bytes): - Data that was attached to the callback button
- data (
- Returns:
- CallbackQueryPayload
- Raises:
telegram.Error
-
ID= 'callbackQueryPayloadData'¶
-
static
read(q: dict, *args) → pytglib.api.types.callback_query_payload_data.CallbackQueryPayloadData¶
pytglib.api.types.callback_query_payload_game module¶
-
class
pytglib.api.types.callback_query_payload_game.CallbackQueryPayloadGame(game_short_name, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe payload for a game callback button
- Attributes:
- ID (
str):CallbackQueryPayloadGame - Args:
- game_short_name (
str): - A short name of the game that was attached to the callback button
- game_short_name (
- Returns:
- CallbackQueryPayload
- Raises:
telegram.Error
-
ID= 'callbackQueryPayloadGame'¶
-
static
read(q: dict, *args) → pytglib.api.types.callback_query_payload_game.CallbackQueryPayloadGame¶
pytglib.api.types.can_transfer_ownership_result module¶
-
class
pytglib.api.types.can_transfer_ownership_result.CanTransferOwnershipResult(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents result of checking whether the current session can be used to transfer a chat ownership to another user
No parameters required.
-
ID= 'canTransferOwnershipResult'¶
-
static
read(q: dict, *args) → CanTransferOwnershipResultPasswordTooFresh or CanTransferOwnershipResultOk or CanTransferOwnershipResultSessionTooFresh or CanTransferOwnershipResultPasswordNeeded¶
-
pytglib.api.types.can_transfer_ownership_result_ok module¶
-
class
pytglib.api.types.can_transfer_ownership_result_ok.CanTransferOwnershipResultOk(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe session can be used
- Attributes:
- ID (
str):CanTransferOwnershipResultOk
No parameters required.
- Returns:
- CanTransferOwnershipResult
- Raises:
telegram.Error
-
ID= 'canTransferOwnershipResultOk'¶
-
static
read(q: dict, *args) → pytglib.api.types.can_transfer_ownership_result_ok.CanTransferOwnershipResultOk¶
pytglib.api.types.can_transfer_ownership_result_password_needed module¶
-
class
pytglib.api.types.can_transfer_ownership_result_password_needed.CanTransferOwnershipResultPasswordNeeded(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe 2-step verification needs to be enabled first
- Attributes:
- ID (
str):CanTransferOwnershipResultPasswordNeeded
No parameters required.
- Returns:
- CanTransferOwnershipResult
- Raises:
telegram.Error
-
ID= 'canTransferOwnershipResultPasswordNeeded'¶
-
static
read(q: dict, *args) → pytglib.api.types.can_transfer_ownership_result_password_needed.CanTransferOwnershipResultPasswordNeeded¶
pytglib.api.types.can_transfer_ownership_result_password_too_fresh module¶
-
class
pytglib.api.types.can_transfer_ownership_result_password_too_fresh.CanTransferOwnershipResultPasswordTooFresh(retry_after, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe 2-step verification was enabled recently, user needs to wait
- Attributes:
- ID (
str):CanTransferOwnershipResultPasswordTooFresh - Args:
- retry_after (
int): - Time left before the session can be used to transfer ownership of a chat, in seconds
- retry_after (
- Returns:
- CanTransferOwnershipResult
- Raises:
telegram.Error
-
ID= 'canTransferOwnershipResultPasswordTooFresh'¶
-
static
read(q: dict, *args) → pytglib.api.types.can_transfer_ownership_result_password_too_fresh.CanTransferOwnershipResultPasswordTooFresh¶
pytglib.api.types.can_transfer_ownership_result_session_too_fresh module¶
-
class
pytglib.api.types.can_transfer_ownership_result_session_too_fresh.CanTransferOwnershipResultSessionTooFresh(retry_after, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe session was created recently, user needs to wait
- Attributes:
- ID (
str):CanTransferOwnershipResultSessionTooFresh - Args:
- retry_after (
int): - Time left before the session can be used to transfer ownership of a chat, in seconds
- retry_after (
- Returns:
- CanTransferOwnershipResult
- Raises:
telegram.Error
-
ID= 'canTransferOwnershipResultSessionTooFresh'¶
-
static
read(q: dict, *args) → pytglib.api.types.can_transfer_ownership_result_session_too_fresh.CanTransferOwnershipResultSessionTooFresh¶
pytglib.api.types.chat module¶
-
class
pytglib.api.types.chat.Chat(id, type, title, photo, permissions, last_message, positions, message_sender_id, has_protected_content, is_marked_as_unread, is_blocked, has_scheduled_messages, can_be_deleted_only_for_self, can_be_deleted_for_all_users, can_be_reported, default_disable_notification, unread_count, last_read_inbox_message_id, last_read_outbox_message_id, unread_mention_count, unread_reaction_count, notification_settings, available_reactions, message_ttl, theme_name, action_bar, video_chat, pending_join_requests, reply_markup_message_id, draft_message, client_data, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA chat. (Can be a private chat, basic group, supergroup, or secret chat)
- Attributes:
- ID (
str):Chat - Args:
- id (
int): - Chat unique identifier
- type (
telegram.api.types.ChatType): - Type of the chat
- title (
str): - Chat title
- photo (
telegram.api.types.chatPhotoInfo): - Chat photo; may be null
- permissions (
telegram.api.types.chatPermissions): - Actions that non-administrator chat members are allowed to take in the chat
- last_message (
telegram.api.types.message): - Last message in the chat; may be null
- positions (List of
telegram.api.types.chatPosition): - Positions of the chat in chat lists
- message_sender_id (
telegram.api.types.MessageSender): - Identifier of a user or chat that is selected to send messages in the chat; may be null if the user can’t change message sender
- has_protected_content (
bool): - True, if chat content can’t be saved locally, forwarded, or copied
- is_marked_as_unread (
bool): - True, if the chat is marked as unread
- is_blocked (
bool): - True, if the chat is blocked by the current user and private messages from the chat can’t be received
- has_scheduled_messages (
bool): - True, if the chat has scheduled messages
- can_be_deleted_only_for_self (
bool): - True, if the chat messages can be deleted only for the current user while other users will continue to see the messages
- can_be_deleted_for_all_users (
bool): - True, if the chat messages can be deleted for all users
- can_be_reported (
bool): - True, if the chat can be reported to Telegram moderators through reportChat or reportChatPhoto
- default_disable_notification (
bool): - Default value of the disable_notification parameter, used when a message is sent to the chat
- unread_count (
int): - Number of unread messages in the chat
- last_read_inbox_message_id (
int): - Identifier of the last read incoming message
- last_read_outbox_message_id (
int): - Identifier of the last read outgoing message
- unread_mention_count (
int): - Number of unread messages with a mention/reply in the chat
- unread_reaction_count (
int): - Number of messages with unread reactions in the chat
- notification_settings (
telegram.api.types.chatNotificationSettings): - Notification settings for the chat
- available_reactions (List of
str): - List of reactions, available in the chat
- message_ttl (
int): - Current message Time To Live setting (self-destruct timer) for the chat; 0 if not definedTTL is counted from the time message or its content is viewed in secret chats and from the send date in other chats
- theme_name (
str): - If non-empty, name of a theme, set for the chat
- action_bar (
telegram.api.types.ChatActionBar): - Information about actions which must be possible to do through the chat action bar; may be null
- video_chat (
telegram.api.types.videoChat): - Information about video chat of the chat
- pending_join_requests (
telegram.api.types.chatJoinRequestsInfo): - Information about pending join requests; may be null
- reply_markup_message_id (
int): - Identifier of the message from which reply markup needs to be used; 0 if there is no default custom reply markup in the chat
- draft_message (
telegram.api.types.draftMessage): - A draft of a message in the chat; may be null
- client_data (
str): - Application-specific data associated with the chat(For example, the chat scroll position or local chat notification settings can be stored here) Persistent if the message database is used
- id (
- Returns:
- Chat
- Raises:
telegram.Error
-
ID= 'chat'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat.Chat¶
pytglib.api.types.chat_action module¶
-
class
pytglib.api.types.chat_action.ChatAction(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectDescribes the different types of activity in a chat
No parameters required.
-
ID= 'chatAction'¶
-
static
read(q: dict, *args) → ChatActionUploadingDocument or ChatActionChoosingContact or ChatActionUploadingPhoto or ChatActionWatchingAnimations or ChatActionRecordingVideoNote or ChatActionChoosingSticker or ChatActionCancel or ChatActionUploadingVoiceNote or ChatActionUploadingVideo or ChatActionRecordingVideo or ChatActionTyping or ChatActionUploadingVideoNote or ChatActionStartPlayingGame or ChatActionRecordingVoiceNote or ChatActionChoosingLocation¶
-
pytglib.api.types.chat_action_bar module¶
-
class
pytglib.api.types.chat_action_bar.ChatActionBar(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectDescribes actions which must be possible to do through a chat action bar
No parameters required.
-
ID= 'chatActionBar'¶
-
static
read(q: dict, *args) → ChatActionBarReportUnrelatedLocation or ChatActionBarAddContact or ChatActionBarInviteMembers or ChatActionBarSharePhoneNumber or ChatActionBarJoinRequest or ChatActionBarReportSpam or ChatActionBarReportAddBlock¶
-
pytglib.api.types.chat_action_bar_add_contact module¶
-
class
pytglib.api.types.chat_action_bar_add_contact.ChatActionBarAddContact(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe chat is a private or secret chat and the other user can be added to the contact list using the method addContact
- Attributes:
- ID (
str):ChatActionBarAddContact
No parameters required.
- Returns:
- ChatActionBar
- Raises:
telegram.Error
-
ID= 'chatActionBarAddContact'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_action_bar_add_contact.ChatActionBarAddContact¶
pytglib.api.types.chat_action_bar_report_add_block module¶
-
class
pytglib.api.types.chat_action_bar_report_add_block.ChatActionBarReportAddBlock(can_unarchive, distance, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe chat is a private or secret chat, which can be reported using the method reportChat, or the other user can be blocked using the method toggleMessageSenderIsBlocked, or the other user can be added to the contact list using the method addContact
- Attributes:
- ID (
str):ChatActionBarReportAddBlock - Args:
- can_unarchive (
bool): - If true, the chat was automatically archived and can be moved back to the main chat list using addChatToList simultaneously with setting chat notification settings to default using setChatNotificationSettings
- distance (
int): - If non-negative, the current user was found by the peer through searchChatsNearby and this is the distance between the users
- can_unarchive (
- Returns:
- ChatActionBar
- Raises:
telegram.Error
-
ID= 'chatActionBarReportAddBlock'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_action_bar_report_add_block.ChatActionBarReportAddBlock¶
pytglib.api.types.chat_action_bar_report_spam module¶
-
class
pytglib.api.types.chat_action_bar_report_spam.ChatActionBarReportSpam(can_unarchive, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe chat can be reported as spam using the method reportChat with the reason chatReportReasonSpam
- Attributes:
- ID (
str):ChatActionBarReportSpam - Args:
- can_unarchive (
bool): - If true, the chat was automatically archived and can be moved back to the main chat list using addChatToList simultaneously with setting chat notification settings to default using setChatNotificationSettings
- can_unarchive (
- Returns:
- ChatActionBar
- Raises:
telegram.Error
-
ID= 'chatActionBarReportSpam'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_action_bar_report_spam.ChatActionBarReportSpam¶
pytglib.api.types.chat_action_cancel module¶
-
class
pytglib.api.types.chat_action_cancel.ChatActionCancel(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe user has canceled the previous action
- Attributes:
- ID (
str):ChatActionCancel
No parameters required.
- Returns:
- ChatAction
- Raises:
telegram.Error
-
ID= 'chatActionCancel'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_action_cancel.ChatActionCancel¶
pytglib.api.types.chat_action_choosing_contact module¶
-
class
pytglib.api.types.chat_action_choosing_contact.ChatActionChoosingContact(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe user is picking a contact to send
- Attributes:
- ID (
str):ChatActionChoosingContact
No parameters required.
- Returns:
- ChatAction
- Raises:
telegram.Error
-
ID= 'chatActionChoosingContact'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_action_choosing_contact.ChatActionChoosingContact¶
pytglib.api.types.chat_action_choosing_location module¶
-
class
pytglib.api.types.chat_action_choosing_location.ChatActionChoosingLocation(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe user is picking a location or venue to send
- Attributes:
- ID (
str):ChatActionChoosingLocation
No parameters required.
- Returns:
- ChatAction
- Raises:
telegram.Error
-
ID= 'chatActionChoosingLocation'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_action_choosing_location.ChatActionChoosingLocation¶
pytglib.api.types.chat_action_recording_video module¶
-
class
pytglib.api.types.chat_action_recording_video.ChatActionRecordingVideo(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe user is recording a video
- Attributes:
- ID (
str):ChatActionRecordingVideo
No parameters required.
- Returns:
- ChatAction
- Raises:
telegram.Error
-
ID= 'chatActionRecordingVideo'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_action_recording_video.ChatActionRecordingVideo¶
pytglib.api.types.chat_action_recording_video_note module¶
-
class
pytglib.api.types.chat_action_recording_video_note.ChatActionRecordingVideoNote(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe user is recording a video note
- Attributes:
- ID (
str):ChatActionRecordingVideoNote
No parameters required.
- Returns:
- ChatAction
- Raises:
telegram.Error
-
ID= 'chatActionRecordingVideoNote'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_action_recording_video_note.ChatActionRecordingVideoNote¶
pytglib.api.types.chat_action_recording_voice_note module¶
-
class
pytglib.api.types.chat_action_recording_voice_note.ChatActionRecordingVoiceNote(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe user is recording a voice note
- Attributes:
- ID (
str):ChatActionRecordingVoiceNote
No parameters required.
- Returns:
- ChatAction
- Raises:
telegram.Error
-
ID= 'chatActionRecordingVoiceNote'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_action_recording_voice_note.ChatActionRecordingVoiceNote¶
pytglib.api.types.chat_action_start_playing_game module¶
-
class
pytglib.api.types.chat_action_start_playing_game.ChatActionStartPlayingGame(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe user has started to play a game
- Attributes:
- ID (
str):ChatActionStartPlayingGame
No parameters required.
- Returns:
- ChatAction
- Raises:
telegram.Error
-
ID= 'chatActionStartPlayingGame'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_action_start_playing_game.ChatActionStartPlayingGame¶
pytglib.api.types.chat_action_typing module¶
-
class
pytglib.api.types.chat_action_typing.ChatActionTyping(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe user is typing a message
- Attributes:
- ID (
str):ChatActionTyping
No parameters required.
- Returns:
- ChatAction
- Raises:
telegram.Error
-
ID= 'chatActionTyping'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_action_typing.ChatActionTyping¶
pytglib.api.types.chat_action_uploading_document module¶
-
class
pytglib.api.types.chat_action_uploading_document.ChatActionUploadingDocument(progress, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe user is uploading a document
- Attributes:
- ID (
str):ChatActionUploadingDocument - Args:
- progress (
int): - Upload progress, as a percentage
- progress (
- Returns:
- ChatAction
- Raises:
telegram.Error
-
ID= 'chatActionUploadingDocument'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_action_uploading_document.ChatActionUploadingDocument¶
pytglib.api.types.chat_action_uploading_photo module¶
-
class
pytglib.api.types.chat_action_uploading_photo.ChatActionUploadingPhoto(progress, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe user is uploading a photo
- Attributes:
- ID (
str):ChatActionUploadingPhoto - Args:
- progress (
int): - Upload progress, as a percentage
- progress (
- Returns:
- ChatAction
- Raises:
telegram.Error
-
ID= 'chatActionUploadingPhoto'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_action_uploading_photo.ChatActionUploadingPhoto¶
pytglib.api.types.chat_action_uploading_video module¶
-
class
pytglib.api.types.chat_action_uploading_video.ChatActionUploadingVideo(progress, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe user is uploading a video
- Attributes:
- ID (
str):ChatActionUploadingVideo - Args:
- progress (
int): - Upload progress, as a percentage
- progress (
- Returns:
- ChatAction
- Raises:
telegram.Error
-
ID= 'chatActionUploadingVideo'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_action_uploading_video.ChatActionUploadingVideo¶
pytglib.api.types.chat_action_uploading_video_note module¶
-
class
pytglib.api.types.chat_action_uploading_video_note.ChatActionUploadingVideoNote(progress, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe user is uploading a video note
- Attributes:
- ID (
str):ChatActionUploadingVideoNote - Args:
- progress (
int): - Upload progress, as a percentage
- progress (
- Returns:
- ChatAction
- Raises:
telegram.Error
-
ID= 'chatActionUploadingVideoNote'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_action_uploading_video_note.ChatActionUploadingVideoNote¶
pytglib.api.types.chat_action_uploading_voice_note module¶
-
class
pytglib.api.types.chat_action_uploading_voice_note.ChatActionUploadingVoiceNote(progress, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe user is uploading a voice note
- Attributes:
- ID (
str):ChatActionUploadingVoiceNote - Args:
- progress (
int): - Upload progress, as a percentage
- progress (
- Returns:
- ChatAction
- Raises:
telegram.Error
-
ID= 'chatActionUploadingVoiceNote'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_action_uploading_voice_note.ChatActionUploadingVoiceNote¶
pytglib.api.types.chat_administrator module¶
-
class
pytglib.api.types.chat_administrator.ChatAdministrator(user_id, custom_title, is_owner, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains information about a chat administrator
- Attributes:
- ID (
str):ChatAdministrator - Args:
- user_id (
int): - User identifier of the administrator
- custom_title (
str): - Custom title of the administrator
- is_owner (
bool): - True, if the user is the owner of the chat
- user_id (
- Returns:
- ChatAdministrator
- Raises:
telegram.Error
-
ID= 'chatAdministrator'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_administrator.ChatAdministrator¶
pytglib.api.types.chat_administrators module¶
-
class
pytglib.api.types.chat_administrators.ChatAdministrators(administrators, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents a list of chat administrators
- Attributes:
- ID (
str):ChatAdministrators - Args:
- administrators (List of
telegram.api.types.chatAdministrator): - A list of chat administrators
- administrators (List of
- Returns:
- ChatAdministrators
- Raises:
telegram.Error
-
ID= 'chatAdministrators'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_administrators.ChatAdministrators¶
pytglib.api.types.chat_event module¶
-
class
pytglib.api.types.chat_event.ChatEvent(id, date, member_id, action, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents a chat event
- Attributes:
- ID (
str):ChatEvent - Args:
- id (
int): - Chat event identifier
- date (
int): - Point in time (Unix timestamp) when the event happened
- member_id (
telegram.api.types.MessageSender): - Identifier of the user or chat who performed the action
- action (
telegram.api.types.ChatEventAction): - The action
- id (
- Returns:
- ChatEvent
- Raises:
telegram.Error
-
ID= 'chatEvent'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_event.ChatEvent¶
pytglib.api.types.chat_event_action module¶
-
class
pytglib.api.types.chat_event_action.ChatEventAction(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents a chat event
No parameters required.
-
ID= 'chatEventAction'¶
-
static
read(q: dict, *args) → ChatEventAvailableReactionsChanged or ChatEventMessagePinned or ChatEventVideoChatParticipantIsMutedToggled or ChatEventSlowModeDelayChanged or ChatEventMemberJoinedByInviteLink or ChatEventInviteLinkDeleted or ChatEventSignMessagesToggled or ChatEventMessageUnpinned or ChatEventVideoChatCreated or ChatEventHasProtectedContentToggled or ChatEventLocationChanged or ChatEventMessageEdited or ChatEventVideoChatEnded or ChatEventPollStopped or ChatEventMemberJoined or ChatEventTitleChanged or ChatEventVideoChatParticipantVolumeLevelChanged or ChatEventUsernameChanged or ChatEventMessageDeleted or ChatEventDescriptionChanged or ChatEventMemberRestricted or ChatEventMessageTtlChanged or ChatEventMemberLeft or ChatEventVideoChatMuteNewParticipantsToggled or ChatEventPermissionsChanged or ChatEventMemberJoinedByRequest or ChatEventMemberInvited or ChatEventInvitesToggled or ChatEventInviteLinkEdited or ChatEventInviteLinkRevoked or ChatEventIsAllHistoryAvailableToggled or ChatEventLinkedChatChanged or ChatEventPhotoChanged or ChatEventStickerSetChanged or ChatEventMemberPromoted¶
-
pytglib.api.types.chat_event_description_changed module¶
-
class
pytglib.api.types.chat_event_description_changed.ChatEventDescriptionChanged(old_description, new_description, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe chat description was changed
- Attributes:
- ID (
str):ChatEventDescriptionChanged - Args:
- old_description (
str): - Previous chat description
- new_description (
str): - New chat description
- old_description (
- Returns:
- ChatEventAction
- Raises:
telegram.Error
-
ID= 'chatEventDescriptionChanged'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_event_description_changed.ChatEventDescriptionChanged¶
pytglib.api.types.chat_event_invites_toggled module¶
-
class
pytglib.api.types.chat_event_invites_toggled.ChatEventInvitesToggled(can_invite_users, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe can_invite_users permission of a supergroup chat was toggled
- Attributes:
- ID (
str):ChatEventInvitesToggled - Args:
- can_invite_users (
bool): - New value of can_invite_users permission
- can_invite_users (
- Returns:
- ChatEventAction
- Raises:
telegram.Error
-
ID= 'chatEventInvitesToggled'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_event_invites_toggled.ChatEventInvitesToggled¶
pytglib.api.types.chat_event_is_all_history_available_toggled module¶
-
class
pytglib.api.types.chat_event_is_all_history_available_toggled.ChatEventIsAllHistoryAvailableToggled(is_all_history_available, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe is_all_history_available setting of a supergroup was toggled
- Attributes:
- ID (
str):ChatEventIsAllHistoryAvailableToggled - Args:
- is_all_history_available (
bool): - New value of is_all_history_available
- is_all_history_available (
- Returns:
- ChatEventAction
- Raises:
telegram.Error
-
ID= 'chatEventIsAllHistoryAvailableToggled'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_event_is_all_history_available_toggled.ChatEventIsAllHistoryAvailableToggled¶
pytglib.api.types.chat_event_linked_chat_changed module¶
-
class
pytglib.api.types.chat_event_linked_chat_changed.ChatEventLinkedChatChanged(old_linked_chat_id, new_linked_chat_id, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe linked chat of a supergroup was changed
- Attributes:
- ID (
str):ChatEventLinkedChatChanged - Args:
- old_linked_chat_id (
int): - Previous supergroup linked chat identifier
- new_linked_chat_id (
int): - New supergroup linked chat identifier
- old_linked_chat_id (
- Returns:
- ChatEventAction
- Raises:
telegram.Error
-
ID= 'chatEventLinkedChatChanged'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_event_linked_chat_changed.ChatEventLinkedChatChanged¶
pytglib.api.types.chat_event_location_changed module¶
-
class
pytglib.api.types.chat_event_location_changed.ChatEventLocationChanged(old_location, new_location, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe supergroup location was changed
- Attributes:
- ID (
str):ChatEventLocationChanged - Args:
- old_location (
telegram.api.types.chatLocation): - Previous location; may be null
- new_location (
telegram.api.types.chatLocation): - New location; may be null
- old_location (
- Returns:
- ChatEventAction
- Raises:
telegram.Error
-
ID= 'chatEventLocationChanged'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_event_location_changed.ChatEventLocationChanged¶
pytglib.api.types.chat_event_log_filters module¶
-
class
pytglib.api.types.chat_event_log_filters.ChatEventLogFilters(message_edits, message_deletions, message_pins, member_joins, member_leaves, member_invites, member_promotions, member_restrictions, info_changes, setting_changes, invite_link_changes, video_chat_changes, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents a set of filters used to obtain a chat event log
- Attributes:
- ID (
str):ChatEventLogFilters - Args:
- message_edits (
bool): - True, if message edits need to be returned
- message_deletions (
bool): - True, if message deletions need to be returned
- message_pins (
bool): - True, if pin/unpin events need to be returned
- member_joins (
bool): - True, if members joining events need to be returned
- member_leaves (
bool): - True, if members leaving events need to be returned
- member_invites (
bool): - True, if invited member events need to be returned
- member_promotions (
bool): - True, if member promotion/demotion events need to be returned
- member_restrictions (
bool): - True, if member restricted/unrestricted/banned/unbanned events need to be returned
- info_changes (
bool): - True, if changes in chat information need to be returned
- setting_changes (
bool): - True, if changes in chat settings need to be returned
- invite_link_changes (
bool): - True, if changes to invite links need to be returned
- video_chat_changes (
bool): - True, if video chat actions need to be returned
- message_edits (
- Returns:
- ChatEventLogFilters
- Raises:
telegram.Error
-
ID= 'chatEventLogFilters'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_event_log_filters.ChatEventLogFilters¶
pytglib.api.types.chat_event_member_invited module¶
-
class
pytglib.api.types.chat_event_member_invited.ChatEventMemberInvited(user_id, status, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA new chat member was invited
- Attributes:
- ID (
str):ChatEventMemberInvited - Args:
- user_id (
int): - New member user identifier
- status (
telegram.api.types.ChatMemberStatus): - New member status
- user_id (
- Returns:
- ChatEventAction
- Raises:
telegram.Error
-
ID= 'chatEventMemberInvited'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_event_member_invited.ChatEventMemberInvited¶
pytglib.api.types.chat_event_member_joined module¶
-
class
pytglib.api.types.chat_event_member_joined.ChatEventMemberJoined(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA new member joined the chat
- Attributes:
- ID (
str):ChatEventMemberJoined
No parameters required.
- Returns:
- ChatEventAction
- Raises:
telegram.Error
-
ID= 'chatEventMemberJoined'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_event_member_joined.ChatEventMemberJoined¶
pytglib.api.types.chat_event_member_left module¶
-
class
pytglib.api.types.chat_event_member_left.ChatEventMemberLeft(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA member left the chat
- Attributes:
- ID (
str):ChatEventMemberLeft
No parameters required.
- Returns:
- ChatEventAction
- Raises:
telegram.Error
-
ID= 'chatEventMemberLeft'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_event_member_left.ChatEventMemberLeft¶
pytglib.api.types.chat_event_member_promoted module¶
-
class
pytglib.api.types.chat_event_member_promoted.ChatEventMemberPromoted(user_id, old_status, new_status, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA chat member has gained/lost administrator status, or the list of their administrator privileges has changed
- Attributes:
- ID (
str):ChatEventMemberPromoted - Args:
- user_id (
int): - Affected chat member user identifier
- old_status (
telegram.api.types.ChatMemberStatus): - Previous status of the chat member
- new_status (
telegram.api.types.ChatMemberStatus): - New status of the chat member
- user_id (
- Returns:
- ChatEventAction
- Raises:
telegram.Error
-
ID= 'chatEventMemberPromoted'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_event_member_promoted.ChatEventMemberPromoted¶
pytglib.api.types.chat_event_member_restricted module¶
-
class
pytglib.api.types.chat_event_member_restricted.ChatEventMemberRestricted(member_id, old_status, new_status, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA chat member was restricted/unrestricted or banned/unbanned, or the list of their restrictions has changed
- Attributes:
- ID (
str):ChatEventMemberRestricted - Args:
- member_id (
telegram.api.types.MessageSender): - Affected chat member identifier
- old_status (
telegram.api.types.ChatMemberStatus): - Previous status of the chat member
- new_status (
telegram.api.types.ChatMemberStatus): - New status of the chat member
- member_id (
- Returns:
- ChatEventAction
- Raises:
telegram.Error
-
ID= 'chatEventMemberRestricted'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_event_member_restricted.ChatEventMemberRestricted¶
pytglib.api.types.chat_event_message_deleted module¶
-
class
pytglib.api.types.chat_event_message_deleted.ChatEventMessageDeleted(message, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA message was deleted
- Attributes:
- ID (
str):ChatEventMessageDeleted - Args:
- message (
telegram.api.types.message): - Deleted message
- message (
- Returns:
- ChatEventAction
- Raises:
telegram.Error
-
ID= 'chatEventMessageDeleted'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_event_message_deleted.ChatEventMessageDeleted¶
pytglib.api.types.chat_event_message_edited module¶
-
class
pytglib.api.types.chat_event_message_edited.ChatEventMessageEdited(old_message, new_message, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA message was edited
- Attributes:
- ID (
str):ChatEventMessageEdited - Args:
- old_message (
telegram.api.types.message): - The original message before the edit
- new_message (
telegram.api.types.message): - The message after it was edited
- old_message (
- Returns:
- ChatEventAction
- Raises:
telegram.Error
-
ID= 'chatEventMessageEdited'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_event_message_edited.ChatEventMessageEdited¶
pytglib.api.types.chat_event_message_pinned module¶
-
class
pytglib.api.types.chat_event_message_pinned.ChatEventMessagePinned(message, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA message was pinned
- Attributes:
- ID (
str):ChatEventMessagePinned - Args:
- message (
telegram.api.types.message): - Pinned message
- message (
- Returns:
- ChatEventAction
- Raises:
telegram.Error
-
ID= 'chatEventMessagePinned'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_event_message_pinned.ChatEventMessagePinned¶
pytglib.api.types.chat_event_message_unpinned module¶
-
class
pytglib.api.types.chat_event_message_unpinned.ChatEventMessageUnpinned(message, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA message was unpinned
- Attributes:
- ID (
str):ChatEventMessageUnpinned - Args:
- message (
telegram.api.types.message): - Unpinned message
- message (
- Returns:
- ChatEventAction
- Raises:
telegram.Error
-
ID= 'chatEventMessageUnpinned'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_event_message_unpinned.ChatEventMessageUnpinned¶
pytglib.api.types.chat_event_permissions_changed module¶
-
class
pytglib.api.types.chat_event_permissions_changed.ChatEventPermissionsChanged(old_permissions, new_permissions, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe chat permissions was changed
- Attributes:
- ID (
str):ChatEventPermissionsChanged - Args:
- old_permissions (
telegram.api.types.chatPermissions): - Previous chat permissions
- new_permissions (
telegram.api.types.chatPermissions): - New chat permissions
- old_permissions (
- Returns:
- ChatEventAction
- Raises:
telegram.Error
-
ID= 'chatEventPermissionsChanged'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_event_permissions_changed.ChatEventPermissionsChanged¶
pytglib.api.types.chat_event_photo_changed module¶
-
class
pytglib.api.types.chat_event_photo_changed.ChatEventPhotoChanged(old_photo, new_photo, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe chat photo was changed
- Attributes:
- ID (
str):ChatEventPhotoChanged - Args:
- old_photo (
telegram.api.types.chatPhoto): - Previous chat photo value; may be null
- new_photo (
telegram.api.types.chatPhoto): - New chat photo value; may be null
- old_photo (
- Returns:
- ChatEventAction
- Raises:
telegram.Error
-
ID= 'chatEventPhotoChanged'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_event_photo_changed.ChatEventPhotoChanged¶
pytglib.api.types.chat_event_poll_stopped module¶
-
class
pytglib.api.types.chat_event_poll_stopped.ChatEventPollStopped(message, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA poll in a message was stopped
- Attributes:
- ID (
str):ChatEventPollStopped - Args:
- message (
telegram.api.types.message): - The message with the poll
- message (
- Returns:
- ChatEventAction
- Raises:
telegram.Error
-
ID= 'chatEventPollStopped'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_event_poll_stopped.ChatEventPollStopped¶
pytglib.api.types.chat_event_sign_messages_toggled module¶
-
class
pytglib.api.types.chat_event_sign_messages_toggled.ChatEventSignMessagesToggled(sign_messages, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe sign_messages setting of a channel was toggled
- Attributes:
- ID (
str):ChatEventSignMessagesToggled - Args:
- sign_messages (
bool): - New value of sign_messages
- sign_messages (
- Returns:
- ChatEventAction
- Raises:
telegram.Error
-
ID= 'chatEventSignMessagesToggled'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_event_sign_messages_toggled.ChatEventSignMessagesToggled¶
pytglib.api.types.chat_event_slow_mode_delay_changed module¶
-
class
pytglib.api.types.chat_event_slow_mode_delay_changed.ChatEventSlowModeDelayChanged(old_slow_mode_delay, new_slow_mode_delay, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe slow_mode_delay setting of a supergroup was changed
- Attributes:
- ID (
str):ChatEventSlowModeDelayChanged - Args:
- old_slow_mode_delay (
int): - Previous value of slow_mode_delay, in seconds
- new_slow_mode_delay (
int): - New value of slow_mode_delay, in seconds
- old_slow_mode_delay (
- Returns:
- ChatEventAction
- Raises:
telegram.Error
-
ID= 'chatEventSlowModeDelayChanged'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_event_slow_mode_delay_changed.ChatEventSlowModeDelayChanged¶
pytglib.api.types.chat_event_sticker_set_changed module¶
-
class
pytglib.api.types.chat_event_sticker_set_changed.ChatEventStickerSetChanged(old_sticker_set_id, new_sticker_set_id, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe supergroup sticker set was changed
- Attributes:
- ID (
str):ChatEventStickerSetChanged - Args:
- old_sticker_set_id (
int): - Previous identifier of the chat sticker set; 0 if none
- new_sticker_set_id (
int): - New identifier of the chat sticker set; 0 if none
- old_sticker_set_id (
- Returns:
- ChatEventAction
- Raises:
telegram.Error
-
ID= 'chatEventStickerSetChanged'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_event_sticker_set_changed.ChatEventStickerSetChanged¶
pytglib.api.types.chat_event_title_changed module¶
-
class
pytglib.api.types.chat_event_title_changed.ChatEventTitleChanged(old_title, new_title, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe chat title was changed
- Attributes:
- ID (
str):ChatEventTitleChanged - Args:
- old_title (
str): - Previous chat title
- new_title (
str): - New chat title
- old_title (
- Returns:
- ChatEventAction
- Raises:
telegram.Error
-
ID= 'chatEventTitleChanged'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_event_title_changed.ChatEventTitleChanged¶
pytglib.api.types.chat_event_username_changed module¶
-
class
pytglib.api.types.chat_event_username_changed.ChatEventUsernameChanged(old_username, new_username, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe chat username was changed
- Attributes:
- ID (
str):ChatEventUsernameChanged - Args:
- old_username (
str): - Previous chat username
- new_username (
str): - New chat username
- old_username (
- Returns:
- ChatEventAction
- Raises:
telegram.Error
-
ID= 'chatEventUsernameChanged'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_event_username_changed.ChatEventUsernameChanged¶
pytglib.api.types.chat_events module¶
-
class
pytglib.api.types.chat_events.ChatEvents(events, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains a list of chat events
- Attributes:
- ID (
str):ChatEvents - Args:
- events (List of
telegram.api.types.chatEvent): - List of events
- events (List of
- Returns:
- ChatEvents
- Raises:
telegram.Error
-
ID= 'chatEvents'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_events.ChatEvents¶
pytglib.api.types.chat_invite_link module¶
-
class
pytglib.api.types.chat_invite_link.ChatInviteLink(invite_link, name, creator_user_id, date, edit_date, expiration_date, member_limit, member_count, pending_join_request_count, creates_join_request, is_primary, is_revoked, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains a chat invite link
- Attributes:
- ID (
str):ChatInviteLink - Args:
- invite_link (
str): - Chat invite link
- name (
str): - Name of the link
- creator_user_id (
int): - User identifier of an administrator created the link
- date (
int): - Point in time (Unix timestamp) when the link was created
- edit_date (
int): - Point in time (Unix timestamp) when the link was last edited; 0 if never or unknown
- expiration_date (
int): - Point in time (Unix timestamp) when the link will expire; 0 if never
- member_limit (
int): - The maximum number of members, which can join the chat using the link simultaneously; 0 if not limitedAlways 0 if the link requires approval
- member_count (
int): - Number of chat members, which joined the chat using the link
- pending_join_request_count (
int): - Number of pending join requests created using this link
- creates_join_request (
bool): - True, if the link only creates join requestIf true, total number of joining members will be unlimited
- is_primary (
bool): - True, if the link is primaryPrimary invite link can’t have name, expiration date, or usage limitThere is exactly one primary invite link for each administrator with can_invite_users right at a given time
- is_revoked (
bool): - True, if the link was revoked
- invite_link (
- Returns:
- ChatInviteLink
- Raises:
telegram.Error
-
ID= 'chatInviteLink'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_invite_link.ChatInviteLink¶
pytglib.api.types.chat_invite_link_info module¶
-
class
pytglib.api.types.chat_invite_link_info.ChatInviteLinkInfo(chat_id, accessible_for, type, title, photo, description, member_count, member_user_ids, creates_join_request, is_public, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains information about a chat invite link
- Attributes:
- ID (
str):ChatInviteLinkInfo - Args:
- chat_id (
int): - Chat identifier of the invite link; 0 if the user has no access to the chat before joining
- accessible_for (
int): - If non-zero, the amount of time for which read access to the chat will remain available, in seconds
- type (
telegram.api.types.ChatType): - Type of the chat
- title (
str): - Title of the chat
- photo (
telegram.api.types.chatPhotoInfo): - Chat photo; may be null
- description (
str): - Chat description
- member_count (
int): - Number of members in the chat
- member_user_ids (List of
int): - User identifiers of some chat members that may be known to the current user
- creates_join_request (
bool): - True, if the link only creates join request
- is_public (
bool): - True, if the chat is a public supergroup or channel, ieit has a username or it is a location-based supergroup
- chat_id (
- Returns:
- ChatInviteLinkInfo
- Raises:
telegram.Error
-
ID= 'chatInviteLinkInfo'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_invite_link_info.ChatInviteLinkInfo¶
pytglib.api.types.chat_list module¶
-
class
pytglib.api.types.chat_list.ChatList(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectDescribes a list of chats
No parameters required.
-
ID= 'chatList'¶
-
static
read(q: dict, *args) → ChatListFilter or ChatListArchive or ChatListMain¶
-
pytglib.api.types.chat_list_archive module¶
-
class
pytglib.api.types.chat_list_archive.ChatListArchive(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA list of chats usually located at the top of the main chat list. Unmuted chats are automatically moved from the Archive to the Main chat list when a new message arrives
- Attributes:
- ID (
str):ChatListArchive
No parameters required.
- Returns:
- ChatList
- Raises:
telegram.Error
-
ID= 'chatListArchive'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_list_archive.ChatListArchive¶
pytglib.api.types.chat_list_main module¶
-
class
pytglib.api.types.chat_list_main.ChatListMain(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA main list of chats
- Attributes:
- ID (
str):ChatListMain
No parameters required.
- Returns:
- ChatList
- Raises:
telegram.Error
-
ID= 'chatListMain'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_list_main.ChatListMain¶
pytglib.api.types.chat_location module¶
-
class
pytglib.api.types.chat_location.ChatLocation(location, address, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents a location to which a chat is connected
- Attributes:
- ID (
str):ChatLocation - Args:
- location (
telegram.api.types.location): - The location
- address (
str): - Location address; 1-64 characters, as defined by the chat owner
- location (
- Returns:
- ChatLocation
- Raises:
telegram.Error
-
ID= 'chatLocation'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_location.ChatLocation¶
pytglib.api.types.chat_member module¶
-
class
pytglib.api.types.chat_member.ChatMember(member_id, inviter_user_id, joined_chat_date, status, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectDescribes a user or a chat as a member of another chat
- Attributes:
- ID (
str):ChatMember - Args:
- member_id (
telegram.api.types.MessageSender): - Identifier of the chat memberCurrently, other chats can be only Left or BannedOnly supergroups and channels can have other chats as Left or Banned members and these chats must be supergroups or channels
- inviter_user_id (
int): - Identifier of a user that invited/promoted/banned this member in the chat; 0 if unknown
- joined_chat_date (
int): - Point in time (Unix timestamp) when the user joined the chat
- status (
telegram.api.types.ChatMemberStatus): - Status of the member in the chat
- member_id (
- Returns:
- ChatMember
- Raises:
telegram.Error
-
ID= 'chatMember'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_member.ChatMember¶
pytglib.api.types.chat_member_status module¶
-
class
pytglib.api.types.chat_member_status.ChatMemberStatus(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectProvides information about the status of a member in a chat
No parameters required.
-
ID= 'chatMemberStatus'¶
-
static
read(q: dict, *args) → ChatMemberStatusRestricted or ChatMemberStatusLeft or ChatMemberStatusMember or ChatMemberStatusBanned or ChatMemberStatusAdministrator or ChatMemberStatusCreator¶
-
pytglib.api.types.chat_member_status_administrator module¶
-
class
pytglib.api.types.chat_member_status_administrator.ChatMemberStatusAdministrator(custom_title, can_be_edited, rights, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe user is a member of the chat and has some additional privileges. In basic groups, administrators can edit and delete messages sent by others, add new members, ban unprivileged members, and manage video chats. In supergroups and channels, there are more detailed options for administrator privileges
- Attributes:
- ID (
str):ChatMemberStatusAdministrator - Args:
- custom_title (
str): - A custom title of the administrator; 0-16 characters without emojis; applicable to supergroups only
- can_be_edited (
bool): - True, if the current user can edit the administrator privileges for the called user
- rights (
telegram.api.types.chatAdministratorRights): - Rights of the administrator
- custom_title (
- Returns:
- ChatMemberStatus
- Raises:
telegram.Error
-
ID= 'chatMemberStatusAdministrator'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_member_status_administrator.ChatMemberStatusAdministrator¶
pytglib.api.types.chat_member_status_banned module¶
-
class
pytglib.api.types.chat_member_status_banned.ChatMemberStatusBanned(banned_until_date, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe user or the chat was banned (and hence is not a member of the chat). Implies the user can’t return to the chat, view messages, or be used as a participant identifier to join a video chat of the chat
- Attributes:
- ID (
str):ChatMemberStatusBanned - Args:
- banned_until_date (
int): - Point in time (Unix timestamp) when the user will be unbanned; 0 if neverIf the user is banned for more than 366 days or for less than 30 seconds from the current time, the user is considered to be banned foreverAlways 0 in basic groups
- banned_until_date (
- Returns:
- ChatMemberStatus
- Raises:
telegram.Error
-
ID= 'chatMemberStatusBanned'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_member_status_banned.ChatMemberStatusBanned¶
pytglib.api.types.chat_member_status_creator module¶
-
class
pytglib.api.types.chat_member_status_creator.ChatMemberStatusCreator(custom_title, is_anonymous, is_member, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe user is the owner of the chat and has all the administrator privileges
- Attributes:
- ID (
str):ChatMemberStatusCreator - Args:
- custom_title (
str): - A custom title of the owner; 0-16 characters without emojis; applicable to supergroups only
- is_anonymous (
bool): - True, if the creator isn’t shown in the chat member list and sends messages anonymously; applicable to supergroups only
- is_member (
bool): - True, if the user is a member of the chat
- custom_title (
- Returns:
- ChatMemberStatus
- Raises:
telegram.Error
-
ID= 'chatMemberStatusCreator'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_member_status_creator.ChatMemberStatusCreator¶
pytglib.api.types.chat_member_status_left module¶
-
class
pytglib.api.types.chat_member_status_left.ChatMemberStatusLeft(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe user or the chat is not a chat member
- Attributes:
- ID (
str):ChatMemberStatusLeft
No parameters required.
- Returns:
- ChatMemberStatus
- Raises:
telegram.Error
-
ID= 'chatMemberStatusLeft'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_member_status_left.ChatMemberStatusLeft¶
pytglib.api.types.chat_member_status_member module¶
-
class
pytglib.api.types.chat_member_status_member.ChatMemberStatusMember(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe user is a member of the chat, without any additional privileges or restrictions
- Attributes:
- ID (
str):ChatMemberStatusMember
No parameters required.
- Returns:
- ChatMemberStatus
- Raises:
telegram.Error
-
ID= 'chatMemberStatusMember'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_member_status_member.ChatMemberStatusMember¶
pytglib.api.types.chat_member_status_restricted module¶
-
class
pytglib.api.types.chat_member_status_restricted.ChatMemberStatusRestricted(is_member, restricted_until_date, permissions, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe user is under certain restrictions in the chat. Not supported in basic groups and channels
- Attributes:
- ID (
str):ChatMemberStatusRestricted - Args:
- is_member (
bool): - True, if the user is a member of the chat
- restricted_until_date (
int): - Point in time (Unix timestamp) when restrictions will be lifted from the user; 0 if neverIf the user is restricted for more than 366 days or for less than 30 seconds from the current time, the user is considered to be restricted forever
- permissions (
telegram.api.types.chatPermissions): - User permissions in the chat
- is_member (
- Returns:
- ChatMemberStatus
- Raises:
telegram.Error
-
ID= 'chatMemberStatusRestricted'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_member_status_restricted.ChatMemberStatusRestricted¶
pytglib.api.types.chat_members module¶
-
class
pytglib.api.types.chat_members.ChatMembers(total_count, members, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains a list of chat members
- Attributes:
- ID (
str):ChatMembers - Args:
- total_count (
int): - Approximate total number of chat members found
- members (List of
telegram.api.types.chatMember): - A list of chat members
- total_count (
- Returns:
- ChatMembers
- Raises:
telegram.Error
-
ID= 'chatMembers'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_members.ChatMembers¶
pytglib.api.types.chat_members_filter module¶
-
class
pytglib.api.types.chat_members_filter.ChatMembersFilter(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectSpecifies the kind of chat members to return in searchChatMembers
No parameters required.
-
ID= 'chatMembersFilter'¶
-
static
read(q: dict, *args) → ChatMembersFilterBots or ChatMembersFilterMention or ChatMembersFilterAdministrators or ChatMembersFilterMembers or ChatMembersFilterContacts or ChatMembersFilterRestricted or ChatMembersFilterBanned¶
-
pytglib.api.types.chat_members_filter_administrators module¶
-
class
pytglib.api.types.chat_members_filter_administrators.ChatMembersFilterAdministrators(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectReturns the owner and administrators
- Attributes:
- ID (
str):ChatMembersFilterAdministrators
No parameters required.
- Returns:
- ChatMembersFilter
- Raises:
telegram.Error
-
ID= 'chatMembersFilterAdministrators'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_members_filter_administrators.ChatMembersFilterAdministrators¶
pytglib.api.types.chat_members_filter_banned module¶
-
class
pytglib.api.types.chat_members_filter_banned.ChatMembersFilterBanned(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectReturns users banned from the chat; can be used only by administrators in a supergroup or in a channel
- Attributes:
- ID (
str):ChatMembersFilterBanned
No parameters required.
- Returns:
- ChatMembersFilter
- Raises:
telegram.Error
-
ID= 'chatMembersFilterBanned'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_members_filter_banned.ChatMembersFilterBanned¶
pytglib.api.types.chat_members_filter_bots module¶
-
class
pytglib.api.types.chat_members_filter_bots.ChatMembersFilterBots(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectReturns bot members of the chat
- Attributes:
- ID (
str):ChatMembersFilterBots
No parameters required.
- Returns:
- ChatMembersFilter
- Raises:
telegram.Error
-
ID= 'chatMembersFilterBots'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_members_filter_bots.ChatMembersFilterBots¶
pytglib.api.types.chat_members_filter_contacts module¶
-
class
pytglib.api.types.chat_members_filter_contacts.ChatMembersFilterContacts(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectReturns contacts of the user
- Attributes:
- ID (
str):ChatMembersFilterContacts
No parameters required.
- Returns:
- ChatMembersFilter
- Raises:
telegram.Error
-
ID= 'chatMembersFilterContacts'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_members_filter_contacts.ChatMembersFilterContacts¶
pytglib.api.types.chat_members_filter_members module¶
-
class
pytglib.api.types.chat_members_filter_members.ChatMembersFilterMembers(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectReturns all chat members, including restricted chat members
- Attributes:
- ID (
str):ChatMembersFilterMembers
No parameters required.
- Returns:
- ChatMembersFilter
- Raises:
telegram.Error
-
ID= 'chatMembersFilterMembers'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_members_filter_members.ChatMembersFilterMembers¶
pytglib.api.types.chat_members_filter_restricted module¶
-
class
pytglib.api.types.chat_members_filter_restricted.ChatMembersFilterRestricted(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectReturns users under certain restrictions in the chat; can be used only by administrators in a supergroup
- Attributes:
- ID (
str):ChatMembersFilterRestricted
No parameters required.
- Returns:
- ChatMembersFilter
- Raises:
telegram.Error
-
ID= 'chatMembersFilterRestricted'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_members_filter_restricted.ChatMembersFilterRestricted¶
pytglib.api.types.chat_nearby module¶
-
class
pytglib.api.types.chat_nearby.ChatNearby(chat_id, distance, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectDescribes a chat located nearby
- Attributes:
- ID (
str):ChatNearby - Args:
- chat_id (
int): - Chat identifier
- distance (
int): - Distance to the chat location, in meters
- chat_id (
- Returns:
- ChatNearby
- Raises:
telegram.Error
-
ID= 'chatNearby'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_nearby.ChatNearby¶
pytglib.api.types.chat_notification_settings module¶
-
class
pytglib.api.types.chat_notification_settings.ChatNotificationSettings(use_default_mute_for, mute_for, use_default_sound, sound_id, use_default_show_preview, show_preview, use_default_disable_pinned_message_notifications, disable_pinned_message_notifications, use_default_disable_mention_notifications, disable_mention_notifications, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains information about notification settings for a chat
- Attributes:
- ID (
str):ChatNotificationSettings - Args:
- use_default_mute_for (
bool): - If true, mute_for is ignored and the value for the relevant type of chat is used instead
- mute_for (
int): - Time left before notifications will be unmuted, in seconds
- use_default_sound (
bool): - If true, the value for the relevant type of chat is used instead of sound_id
- sound_id (
int): - Identifier of the notification sound to be played; 0 if sound is disabled
- use_default_show_preview (
bool): - If true, show_preview is ignored and the value for the relevant type of chat is used instead
- show_preview (
bool): - True, if message content must be displayed in notifications
- use_default_disable_pinned_message_notifications (
bool): - If true, disable_pinned_message_notifications is ignored and the value for the relevant type of chat is used instead
- disable_pinned_message_notifications (
bool): - If true, notifications for incoming pinned messages will be created as for an ordinary unread message
- use_default_disable_mention_notifications (
bool): - If true, disable_mention_notifications is ignored and the value for the relevant type of chat is used instead
- disable_mention_notifications (
bool): - If true, notifications for messages with mentions will be created as for an ordinary unread message
- use_default_mute_for (
- Returns:
- ChatNotificationSettings
- Raises:
telegram.Error
-
ID= 'chatNotificationSettings'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_notification_settings.ChatNotificationSettings¶
pytglib.api.types.chat_permissions module¶
-
class
pytglib.api.types.chat_permissions.ChatPermissions(can_send_messages, can_send_media_messages, can_send_polls, can_send_other_messages, can_add_web_page_previews, can_change_info, can_invite_users, can_pin_messages, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectDescribes actions that a user is allowed to take in a chat
- Attributes:
- ID (
str):ChatPermissions - Args:
- can_send_messages (
bool): - True, if the user can send text messages, contacts, locations, and venues
- can_send_media_messages (
bool): - True, if the user can send audio files, documents, photos, videos, video notes, and voice notesImplies can_send_messages permissions
- can_send_polls (
bool): - True, if the user can send pollsImplies can_send_messages permissions
- can_send_other_messages (
bool): - True, if the user can send animations, games, stickers, and dice and use inline botsImplies can_send_messages permissions
- can_add_web_page_previews (
bool): - True, if the user may add a web page preview to their messagesImplies can_send_messages permissions
- can_change_info (
bool): - True, if the user can change the chat title, photo, and other settings
- can_invite_users (
bool): - True, if the user can invite new users to the chat
- can_pin_messages (
bool): - True, if the user can pin messages
- can_send_messages (
- Returns:
- ChatPermissions
- Raises:
telegram.Error
-
ID= 'chatPermissions'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_permissions.ChatPermissions¶
pytglib.api.types.chat_photo module¶
-
class
pytglib.api.types.chat_photo.ChatPhoto(id, added_date, minithumbnail, sizes, animation, small_animation, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectDescribes a chat or user profile photo
- Attributes:
- ID (
str):ChatPhoto - Args:
- id (
int): - Unique photo identifier
- added_date (
int): - Point in time (Unix timestamp) when the photo has been added
- minithumbnail (
telegram.api.types.minithumbnail): - Photo minithumbnail; may be null
- sizes (List of
telegram.api.types.photoSize): - Available variants of the photo in JPEG format, in different size
- animation (
telegram.api.types.animatedChatPhoto): - A big (640x640) animated variant of the photo in MPEG4 format; may be null
- small_animation (
telegram.api.types.animatedChatPhoto): - A small (160x160) animated variant of the photo in MPEG4 format; may be null even the big animation is available
- id (
- Returns:
- ChatPhoto
- Raises:
telegram.Error
-
ID= 'chatPhoto'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_photo.ChatPhoto¶
pytglib.api.types.chat_report_reason module¶
-
class
pytglib.api.types.chat_report_reason.ChatReportReason(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectDescribes the reason why a chat is reported
No parameters required.
-
ID= 'chatReportReason'¶
-
static
read(q: dict, *args) → ChatReportReasonViolence or ChatReportReasonSpam or ChatReportReasonPornography or ChatReportReasonPersonalDetails or ChatReportReasonCustom or ChatReportReasonCopyright or ChatReportReasonIllegalDrugs or ChatReportReasonChildAbuse or ChatReportReasonFake or ChatReportReasonUnrelatedLocation¶
-
pytglib.api.types.chat_report_reason_child_abuse module¶
-
class
pytglib.api.types.chat_report_reason_child_abuse.ChatReportReasonChildAbuse(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe chat has child abuse related content
- Attributes:
- ID (
str):ChatReportReasonChildAbuse
No parameters required.
- Returns:
- ChatReportReason
- Raises:
telegram.Error
-
ID= 'chatReportReasonChildAbuse'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_report_reason_child_abuse.ChatReportReasonChildAbuse¶
pytglib.api.types.chat_report_reason_copyright module¶
-
class
pytglib.api.types.chat_report_reason_copyright.ChatReportReasonCopyright(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe chat contains copyrighted content
- Attributes:
- ID (
str):ChatReportReasonCopyright
No parameters required.
- Returns:
- ChatReportReason
- Raises:
telegram.Error
-
ID= 'chatReportReasonCopyright'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_report_reason_copyright.ChatReportReasonCopyright¶
pytglib.api.types.chat_report_reason_custom module¶
-
class
pytglib.api.types.chat_report_reason_custom.ChatReportReasonCustom(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA custom reason provided by the user
- Attributes:
- ID (
str):ChatReportReasonCustom
No parameters required.
- Returns:
- ChatReportReason
- Raises:
telegram.Error
-
ID= 'chatReportReasonCustom'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_report_reason_custom.ChatReportReasonCustom¶
pytglib.api.types.chat_report_reason_pornography module¶
-
class
pytglib.api.types.chat_report_reason_pornography.ChatReportReasonPornography(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe chat contains pornographic messages
- Attributes:
- ID (
str):ChatReportReasonPornography
No parameters required.
- Returns:
- ChatReportReason
- Raises:
telegram.Error
-
ID= 'chatReportReasonPornography'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_report_reason_pornography.ChatReportReasonPornography¶
pytglib.api.types.chat_report_reason_spam module¶
-
class
pytglib.api.types.chat_report_reason_spam.ChatReportReasonSpam(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe chat contains spam messages
- Attributes:
- ID (
str):ChatReportReasonSpam
No parameters required.
- Returns:
- ChatReportReason
- Raises:
telegram.Error
-
ID= 'chatReportReasonSpam'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_report_reason_spam.ChatReportReasonSpam¶
pytglib.api.types.chat_report_reason_violence module¶
-
class
pytglib.api.types.chat_report_reason_violence.ChatReportReasonViolence(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe chat promotes violence
- Attributes:
- ID (
str):ChatReportReasonViolence
No parameters required.
- Returns:
- ChatReportReason
- Raises:
telegram.Error
-
ID= 'chatReportReasonViolence'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_report_reason_violence.ChatReportReasonViolence¶
pytglib.api.types.chat_statistics module¶
-
class
pytglib.api.types.chat_statistics.ChatStatistics(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains a detailed statistics about a chat
No parameters required.
-
ID= 'chatStatistics'¶
-
static
read(q: dict, *args) → ChatStatisticsChannel or ChatStatisticsSupergroup¶
-
pytglib.api.types.chat_statistics_message_interaction_counters module¶
pytglib.api.types.chat_type module¶
-
class
pytglib.api.types.chat_type.ChatType(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectDescribes the type of a chat
No parameters required.
-
ID= 'chatType'¶
-
static
read(q: dict, *args) → ChatTypeSecret or ChatTypeBasicGroup or ChatTypePrivate or ChatTypeSupergroup¶
-
pytglib.api.types.chat_type_basic_group module¶
-
class
pytglib.api.types.chat_type_basic_group.ChatTypeBasicGroup(basic_group_id, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA basic group (a chat with 0-200 other users)
- Attributes:
- ID (
str):ChatTypeBasicGroup - Args:
- basic_group_id (
int): - Basic group identifier
- basic_group_id (
- Returns:
- ChatType
- Raises:
telegram.Error
-
ID= 'chatTypeBasicGroup'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_type_basic_group.ChatTypeBasicGroup¶
pytglib.api.types.chat_type_private module¶
-
class
pytglib.api.types.chat_type_private.ChatTypePrivate(user_id, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectAn ordinary chat with a user
- Attributes:
- ID (
str):ChatTypePrivate - Args:
- user_id (
int): - User identifier
- user_id (
- Returns:
- ChatType
- Raises:
telegram.Error
-
ID= 'chatTypePrivate'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_type_private.ChatTypePrivate¶
pytglib.api.types.chat_type_secret module¶
-
class
pytglib.api.types.chat_type_secret.ChatTypeSecret(secret_chat_id, user_id, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA secret chat with a user
- Attributes:
- ID (
str):ChatTypeSecret - Args:
- secret_chat_id (
int): - Secret chat identifier
- user_id (
int): - User identifier of the secret chat peer
- secret_chat_id (
- Returns:
- ChatType
- Raises:
telegram.Error
-
ID= 'chatTypeSecret'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_type_secret.ChatTypeSecret¶
pytglib.api.types.chat_type_supergroup module¶
-
class
pytglib.api.types.chat_type_supergroup.ChatTypeSupergroup(supergroup_id, is_channel, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA supergroup or channel (with unlimited members)
- Attributes:
- ID (
str):ChatTypeSupergroup - Args:
- supergroup_id (
int): - Supergroup or channel identifier
- is_channel (
bool): - True, if the supergroup is a channel
- supergroup_id (
- Returns:
- ChatType
- Raises:
telegram.Error
-
ID= 'chatTypeSupergroup'¶
-
static
read(q: dict, *args) → pytglib.api.types.chat_type_supergroup.ChatTypeSupergroup¶
pytglib.api.types.chats module¶
-
class
pytglib.api.types.chats.Chats(total_count, chat_ids, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents a list of chats
- Attributes:
- ID (
str):Chats - Args:
- total_count (
int): - Approximate total number of chats found
- chat_ids (List of
int): - List of chat identifiers
- total_count (
- Returns:
- Chats
- Raises:
telegram.Error
-
ID= 'chats'¶
-
static
read(q: dict, *args) → pytglib.api.types.chats.Chats¶
pytglib.api.types.chats_nearby module¶
-
class
pytglib.api.types.chats_nearby.ChatsNearby(users_nearby, supergroups_nearby, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents a list of chats located nearby
- Attributes:
- ID (
str):ChatsNearby - Args:
- users_nearby (List of
telegram.api.types.chatNearby): - List of users nearby
- supergroups_nearby (List of
telegram.api.types.chatNearby): - List of location-based supergroups nearby
- users_nearby (List of
- Returns:
- ChatsNearby
- Raises:
telegram.Error
-
ID= 'chatsNearby'¶
-
static
read(q: dict, *args) → pytglib.api.types.chats_nearby.ChatsNearby¶
pytglib.api.types.check_chat_username_result module¶
-
class
pytglib.api.types.check_chat_username_result.CheckChatUsernameResult(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents result of checking whether a username can be set for a chat
No parameters required.
-
ID= 'checkChatUsernameResult'¶
-
static
read(q: dict, *args) → CheckChatUsernameResultUsernameOccupied or CheckChatUsernameResultOk or CheckChatUsernameResultPublicGroupsUnavailable or CheckChatUsernameResultUsernameInvalid or CheckChatUsernameResultPublicChatsTooMuch¶
-
pytglib.api.types.check_chat_username_result_ok module¶
-
class
pytglib.api.types.check_chat_username_result_ok.CheckChatUsernameResultOk(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe username can be set
- Attributes:
- ID (
str):CheckChatUsernameResultOk
No parameters required.
- Returns:
- CheckChatUsernameResult
- Raises:
telegram.Error
-
ID= 'checkChatUsernameResultOk'¶
-
static
read(q: dict, *args) → pytglib.api.types.check_chat_username_result_ok.CheckChatUsernameResultOk¶
pytglib.api.types.check_chat_username_result_public_chats_too_much module¶
-
class
pytglib.api.types.check_chat_username_result_public_chats_too_much.CheckChatUsernameResultPublicChatsTooMuch(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe user has too many chats with username, one of them must be made private first
- Attributes:
- ID (
str):CheckChatUsernameResultPublicChatsTooMuch
No parameters required.
- Returns:
- CheckChatUsernameResult
- Raises:
telegram.Error
-
ID= 'checkChatUsernameResultPublicChatsTooMuch'¶
-
static
read(q: dict, *args) → pytglib.api.types.check_chat_username_result_public_chats_too_much.CheckChatUsernameResultPublicChatsTooMuch¶
pytglib.api.types.check_chat_username_result_username_invalid module¶
-
class
pytglib.api.types.check_chat_username_result_username_invalid.CheckChatUsernameResultUsernameInvalid(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe username is invalid
- Attributes:
- ID (
str):CheckChatUsernameResultUsernameInvalid
No parameters required.
- Returns:
- CheckChatUsernameResult
- Raises:
telegram.Error
-
ID= 'checkChatUsernameResultUsernameInvalid'¶
-
static
read(q: dict, *args) → pytglib.api.types.check_chat_username_result_username_invalid.CheckChatUsernameResultUsernameInvalid¶
pytglib.api.types.check_chat_username_result_username_occupied module¶
-
class
pytglib.api.types.check_chat_username_result_username_occupied.CheckChatUsernameResultUsernameOccupied(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe username is occupied
- Attributes:
- ID (
str):CheckChatUsernameResultUsernameOccupied
No parameters required.
- Returns:
- CheckChatUsernameResult
- Raises:
telegram.Error
-
ID= 'checkChatUsernameResultUsernameOccupied'¶
-
static
read(q: dict, *args) → pytglib.api.types.check_chat_username_result_username_occupied.CheckChatUsernameResultUsernameOccupied¶
pytglib.api.types.connected_website module¶
-
class
pytglib.api.types.connected_website.ConnectedWebsite(id, domain_name, bot_user_id, browser, platform, log_in_date, last_active_date, ip, location, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains information about one website the current user is logged in with Telegram
- Attributes:
- ID (
str):ConnectedWebsite - Args:
- id (
int): - Website identifier
- domain_name (
str): - The domain name of the website
- bot_user_id (
int): - User identifier of a bot linked with the website
- browser (
str): - The version of a browser used to log in
- platform (
str): - Operating system the browser is running on
- log_in_date (
int): - Point in time (Unix timestamp) when the user was logged in
- last_active_date (
int): - Point in time (Unix timestamp) when obtained authorization was last used
- ip (
str): - IP address from which the user was logged in, in human-readable format
- location (
str): - Human-readable description of a country and a region from which the user was logged in, based on the IP address
- id (
- Returns:
- ConnectedWebsite
- Raises:
telegram.Error
-
ID= 'connectedWebsite'¶
-
static
read(q: dict, *args) → pytglib.api.types.connected_website.ConnectedWebsite¶
pytglib.api.types.connected_websites module¶
-
class
pytglib.api.types.connected_websites.ConnectedWebsites(websites, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains a list of websites the current user is logged in with Telegram
- Attributes:
- ID (
str):ConnectedWebsites - Args:
- websites (List of
telegram.api.types.connectedWebsite): - List of connected websites
- websites (List of
- Returns:
- ConnectedWebsites
- Raises:
telegram.Error
-
ID= 'connectedWebsites'¶
-
static
read(q: dict, *args) → pytglib.api.types.connected_websites.ConnectedWebsites¶
pytglib.api.types.connection_state module¶
-
class
pytglib.api.types.connection_state.ConnectionState(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectDescribes the current state of the connection to Telegram servers
No parameters required.
-
ID= 'connectionState'¶
-
static
read(q: dict, *args) → ConnectionStateConnecting or ConnectionStateWaitingForNetwork or ConnectionStateReady or ConnectionStateUpdating or ConnectionStateConnectingToProxy¶
-
pytglib.api.types.connection_state_connecting module¶
-
class
pytglib.api.types.connection_state_connecting.ConnectionStateConnecting(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectCurrently establishing a connection to the Telegram servers
- Attributes:
- ID (
str):ConnectionStateConnecting
No parameters required.
- Returns:
- ConnectionState
- Raises:
telegram.Error
-
ID= 'connectionStateConnecting'¶
-
static
read(q: dict, *args) → pytglib.api.types.connection_state_connecting.ConnectionStateConnecting¶
pytglib.api.types.connection_state_connecting_to_proxy module¶
-
class
pytglib.api.types.connection_state_connecting_to_proxy.ConnectionStateConnectingToProxy(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectCurrently establishing a connection with a proxy server
- Attributes:
- ID (
str):ConnectionStateConnectingToProxy
No parameters required.
- Returns:
- ConnectionState
- Raises:
telegram.Error
-
ID= 'connectionStateConnectingToProxy'¶
-
static
read(q: dict, *args) → pytglib.api.types.connection_state_connecting_to_proxy.ConnectionStateConnectingToProxy¶
pytglib.api.types.connection_state_ready module¶
-
class
pytglib.api.types.connection_state_ready.ConnectionStateReady(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThere is a working connection to the Telegram servers
- Attributes:
- ID (
str):ConnectionStateReady
No parameters required.
- Returns:
- ConnectionState
- Raises:
telegram.Error
-
ID= 'connectionStateReady'¶
-
static
read(q: dict, *args) → pytglib.api.types.connection_state_ready.ConnectionStateReady¶
pytglib.api.types.connection_state_updating module¶
-
class
pytglib.api.types.connection_state_updating.ConnectionStateUpdating(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectDownloading data received while the application was offline
- Attributes:
- ID (
str):ConnectionStateUpdating
No parameters required.
- Returns:
- ConnectionState
- Raises:
telegram.Error
-
ID= 'connectionStateUpdating'¶
-
static
read(q: dict, *args) → pytglib.api.types.connection_state_updating.ConnectionStateUpdating¶
pytglib.api.types.connection_state_waiting_for_network module¶
-
class
pytglib.api.types.connection_state_waiting_for_network.ConnectionStateWaitingForNetwork(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectCurrently waiting for the network to become available. Use setNetworkType to change the available network type
- Attributes:
- ID (
str):ConnectionStateWaitingForNetwork
No parameters required.
- Returns:
- ConnectionState
- Raises:
telegram.Error
-
ID= 'connectionStateWaitingForNetwork'¶
-
static
read(q: dict, *args) → pytglib.api.types.connection_state_waiting_for_network.ConnectionStateWaitingForNetwork¶
pytglib.api.types.contact module¶
-
class
pytglib.api.types.contact.Contact(phone_number, first_name, last_name, vcard, user_id, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectDescribes a user contact
- Attributes:
- ID (
str):Contact - Args:
- phone_number (
str): - Phone number of the user
- first_name (
str): - First name of the user; 1-255 characters in length
- last_name (
str): - Last name of the user
- vcard (
str): - Additional data about the user in a form of vCard; 0-2048 bytes in length
- user_id (
int): - Identifier of the user, if known; otherwise 0
- phone_number (
- Returns:
- Contact
- Raises:
telegram.Error
-
ID= 'contact'¶
-
static
read(q: dict, *args) → pytglib.api.types.contact.Contact¶
pytglib.api.types.count module¶
-
class
pytglib.api.types.count.Count(count, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains a counter
- Attributes:
- ID (
str):Count - Args:
- count (
int): - Count
- count (
- Returns:
- Count
- Raises:
telegram.Error
-
ID= 'count'¶
-
static
read(q: dict, *args) → pytglib.api.types.count.Count¶
pytglib.api.types.custom_request_result module¶
-
class
pytglib.api.types.custom_request_result.CustomRequestResult(result, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains the result of a custom request
- Attributes:
- ID (
str):CustomRequestResult - Args:
- result (
str): - A JSON-serialized result
- result (
- Returns:
- CustomRequestResult
- Raises:
telegram.Error
-
ID= 'customRequestResult'¶
-
static
read(q: dict, *args) → pytglib.api.types.custom_request_result.CustomRequestResult¶
pytglib.api.types.database_statistics module¶
-
class
pytglib.api.types.database_statistics.DatabaseStatistics(statistics, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains database statistics
- Attributes:
- ID (
str):DatabaseStatistics - Args:
- statistics (
str): - Database statistics in an unspecified human-readable format
- statistics (
- Returns:
- DatabaseStatistics
- Raises:
telegram.Error
-
ID= 'databaseStatistics'¶
-
static
read(q: dict, *args) → pytglib.api.types.database_statistics.DatabaseStatistics¶
pytglib.api.types.date module¶
-
class
pytglib.api.types.date.Date(day, month, year, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents a date according to the Gregorian calendar
- Attributes:
- ID (
str):Date - Args:
- day (
int): - Day of the month; 1-31
- month (
int): - Month; 1-12
- year (
int): - Year; 1-9999
- day (
- Returns:
- Date
- Raises:
telegram.Error
-
ID= 'date'¶
-
static
read(q: dict, *args) → pytglib.api.types.date.Date¶
pytglib.api.types.date_range module¶
-
class
pytglib.api.types.date_range.DateRange(start_date, end_date, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents a date range
- Attributes:
- ID (
str):DateRange - Args:
- start_date (
int): - Point in time (Unix timestamp) at which the date range begins
- end_date (
int): - Point in time (Unix timestamp) at which the date range ends
- start_date (
- Returns:
- DateRange
- Raises:
telegram.Error
-
ID= 'dateRange'¶
-
static
read(q: dict, *args) → pytglib.api.types.date_range.DateRange¶
pytglib.api.types.dated_file module¶
-
class
pytglib.api.types.dated_file.DatedFile(file, date, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectFile with the date it was uploaded
- Attributes:
- ID (
str):DatedFile - Args:
- file (
telegram.api.types.file): - The file
- date (
int): - Point in time (Unix timestamp) when the file was uploaded
- file (
- Returns:
- DatedFile
- Raises:
telegram.Error
-
ID= 'datedFile'¶
-
static
read(q: dict, *args) → pytglib.api.types.dated_file.DatedFile¶
pytglib.api.types.deep_link_info module¶
-
class
pytglib.api.types.deep_link_info.DeepLinkInfo(text, need_update_application, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains information about a tg: deep link
- Attributes:
- ID (
str):DeepLinkInfo - Args:
- text (
telegram.api.types.formattedText): - Text to be shown to the user
- need_update_application (
bool): - True, if the user must be asked to update the application
- text (
- Returns:
- DeepLinkInfo
- Raises:
telegram.Error
-
ID= 'deepLinkInfo'¶
-
static
read(q: dict, *args) → pytglib.api.types.deep_link_info.DeepLinkInfo¶
pytglib.api.types.device_token module¶
-
class
pytglib.api.types.device_token.DeviceToken(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents a data needed to subscribe for push notifications through registerDevice method. To use specific push notification service, the correct application platform must be specified and a valid server authentication data must be uploaded at https://my.telegram.org
No parameters required.
-
ID= 'deviceToken'¶
-
static
read(q: dict, *args) → DeviceTokenApplePushVoIP or DeviceTokenWindowsPush or DeviceTokenSimplePush or DeviceTokenBlackBerryPush or DeviceTokenUbuntuPush or DeviceTokenWebPush or DeviceTokenMicrosoftPushVoIP or DeviceTokenMicrosoftPush or DeviceTokenTizenPush or DeviceTokenFirebaseCloudMessaging or DeviceTokenApplePush¶
-
pytglib.api.types.device_token_apple_push module¶
-
class
pytglib.api.types.device_token_apple_push.DeviceTokenApplePush(device_token, is_app_sandbox, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA token for Apple Push Notification service
- Attributes:
- ID (
str):DeviceTokenApplePush - Args:
- device_token (
str): - Device token; may be empty to deregister a device
- is_app_sandbox (
bool): - True, if App Sandbox is enabled
- device_token (
- Returns:
- DeviceToken
- Raises:
telegram.Error
-
ID= 'deviceTokenApplePush'¶
-
static
read(q: dict, *args) → pytglib.api.types.device_token_apple_push.DeviceTokenApplePush¶
pytglib.api.types.device_token_apple_push_vo_ip module¶
-
class
pytglib.api.types.device_token_apple_push_vo_ip.DeviceTokenApplePushVoIP(device_token, is_app_sandbox, encrypt, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA token for Apple Push Notification service VoIP notifications
- Attributes:
- ID (
str):DeviceTokenApplePushVoIP - Args:
- device_token (
str): - Device token; may be empty to deregister a device
- is_app_sandbox (
bool): - True, if App Sandbox is enabled
- encrypt (
bool): - True, if push notifications must be additionally encrypted
- device_token (
- Returns:
- DeviceToken
- Raises:
telegram.Error
-
ID= 'deviceTokenApplePushVoIP'¶
-
static
read(q: dict, *args) → pytglib.api.types.device_token_apple_push_vo_ip.DeviceTokenApplePushVoIP¶
pytglib.api.types.device_token_black_berry_push module¶
-
class
pytglib.api.types.device_token_black_berry_push.DeviceTokenBlackBerryPush(token, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA token for BlackBerry Push Service
- Attributes:
- ID (
str):DeviceTokenBlackBerryPush - Args:
- token (
str): - Token; may be empty to deregister a device
- token (
- Returns:
- DeviceToken
- Raises:
telegram.Error
-
ID= 'deviceTokenBlackBerryPush'¶
-
static
read(q: dict, *args) → pytglib.api.types.device_token_black_berry_push.DeviceTokenBlackBerryPush¶
pytglib.api.types.device_token_firebase_cloud_messaging module¶
-
class
pytglib.api.types.device_token_firebase_cloud_messaging.DeviceTokenFirebaseCloudMessaging(token, encrypt, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA token for Firebase Cloud Messaging
- Attributes:
- ID (
str):DeviceTokenFirebaseCloudMessaging - Args:
- token (
str): - Device registration token; may be empty to deregister a device
- encrypt (
bool): - True, if push notifications must be additionally encrypted
- token (
- Returns:
- DeviceToken
- Raises:
telegram.Error
-
ID= 'deviceTokenFirebaseCloudMessaging'¶
-
static
read(q: dict, *args) → pytglib.api.types.device_token_firebase_cloud_messaging.DeviceTokenFirebaseCloudMessaging¶
pytglib.api.types.device_token_microsoft_push module¶
-
class
pytglib.api.types.device_token_microsoft_push.DeviceTokenMicrosoftPush(channel_uri, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA token for Microsoft Push Notification Service
- Attributes:
- ID (
str):DeviceTokenMicrosoftPush - Args:
- channel_uri (
str): - Push notification channel URI; may be empty to deregister a device
- channel_uri (
- Returns:
- DeviceToken
- Raises:
telegram.Error
-
ID= 'deviceTokenMicrosoftPush'¶
-
static
read(q: dict, *args) → pytglib.api.types.device_token_microsoft_push.DeviceTokenMicrosoftPush¶
pytglib.api.types.device_token_microsoft_push_vo_ip module¶
-
class
pytglib.api.types.device_token_microsoft_push_vo_ip.DeviceTokenMicrosoftPushVoIP(channel_uri, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA token for Microsoft Push Notification Service VoIP channel
- Attributes:
- ID (
str):DeviceTokenMicrosoftPushVoIP - Args:
- channel_uri (
str): - Push notification channel URI; may be empty to deregister a device
- channel_uri (
- Returns:
- DeviceToken
- Raises:
telegram.Error
-
ID= 'deviceTokenMicrosoftPushVoIP'¶
-
static
read(q: dict, *args) → pytglib.api.types.device_token_microsoft_push_vo_ip.DeviceTokenMicrosoftPushVoIP¶
pytglib.api.types.device_token_simple_push module¶
-
class
pytglib.api.types.device_token_simple_push.DeviceTokenSimplePush(endpoint, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA token for Simple Push API for Firefox OS
- Attributes:
- ID (
str):DeviceTokenSimplePush - Args:
- endpoint (
str): - Absolute URL exposed by the push service where the application server can send push messages; may be empty to deregister a device
- endpoint (
- Returns:
- DeviceToken
- Raises:
telegram.Error
-
ID= 'deviceTokenSimplePush'¶
-
static
read(q: dict, *args) → pytglib.api.types.device_token_simple_push.DeviceTokenSimplePush¶
pytglib.api.types.device_token_tizen_push module¶
-
class
pytglib.api.types.device_token_tizen_push.DeviceTokenTizenPush(reg_id, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA token for Tizen Push Service
- Attributes:
- ID (
str):DeviceTokenTizenPush - Args:
- reg_id (
str): - Push service registration identifier; may be empty to deregister a device
- reg_id (
- Returns:
- DeviceToken
- Raises:
telegram.Error
-
ID= 'deviceTokenTizenPush'¶
-
static
read(q: dict, *args) → pytglib.api.types.device_token_tizen_push.DeviceTokenTizenPush¶
pytglib.api.types.device_token_ubuntu_push module¶
-
class
pytglib.api.types.device_token_ubuntu_push.DeviceTokenUbuntuPush(token, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA token for Ubuntu Push Client service
- Attributes:
- ID (
str):DeviceTokenUbuntuPush - Args:
- token (
str): - Token; may be empty to deregister a device
- token (
- Returns:
- DeviceToken
- Raises:
telegram.Error
-
ID= 'deviceTokenUbuntuPush'¶
-
static
read(q: dict, *args) → pytglib.api.types.device_token_ubuntu_push.DeviceTokenUbuntuPush¶
pytglib.api.types.device_token_web_push module¶
-
class
pytglib.api.types.device_token_web_push.DeviceTokenWebPush(endpoint, p256dh_base64url, auth_base64url, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA token for web Push API
- Attributes:
- ID (
str):DeviceTokenWebPush - Args:
- endpoint (
str): - Absolute URL exposed by the push service where the application server can send push messages; may be empty to deregister a device
- p256dh_base64url (
str): - Base64url-encoded P-256 elliptic curve Diffie-Hellman public key
- auth_base64url (
str): - Base64url-encoded authentication secret
- endpoint (
- Returns:
- DeviceToken
- Raises:
telegram.Error
-
ID= 'deviceTokenWebPush'¶
-
static
read(q: dict, *args) → pytglib.api.types.device_token_web_push.DeviceTokenWebPush¶
pytglib.api.types.device_token_windows_push module¶
-
class
pytglib.api.types.device_token_windows_push.DeviceTokenWindowsPush(access_token, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA token for Windows Push Notification Services
- Attributes:
- ID (
str):DeviceTokenWindowsPush - Args:
- access_token (
str): - The access token that will be used to send notifications; may be empty to deregister a device
- access_token (
- Returns:
- DeviceToken
- Raises:
telegram.Error
-
ID= 'deviceTokenWindowsPush'¶
-
static
read(q: dict, *args) → pytglib.api.types.device_token_windows_push.DeviceTokenWindowsPush¶
pytglib.api.types.document module¶
-
class
pytglib.api.types.document.Document(file_name, mime_type, minithumbnail, thumbnail, document, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectDescribes a document of any type
- Attributes:
- ID (
str):Document - Args:
- file_name (
str): - Original name of the file; as defined by the sender
- mime_type (
str): - MIME type of the file; as defined by the sender
- minithumbnail (
telegram.api.types.minithumbnail): - Document minithumbnail; may be null
- thumbnail (
telegram.api.types.thumbnail): - Document thumbnail in JPEG or PNG format (PNG will be used only for background patterns); as defined by the sender; may be null
- document (
telegram.api.types.file): - File containing the document
- file_name (
- Returns:
- Document
- Raises:
telegram.Error
-
ID= 'document'¶
-
static
read(q: dict, *args) → pytglib.api.types.document.Document¶
pytglib.api.types.draft_message module¶
-
class
pytglib.api.types.draft_message.DraftMessage(reply_to_message_id, date, input_message_text, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains information about a message draft
- Attributes:
- ID (
str):DraftMessage - Args:
- reply_to_message_id (
int): - Identifier of the replied message; 0 if none
- date (
int): - Point in time (Unix timestamp) when the draft was created
- input_message_text (
telegram.api.types.InputMessageContent): - Content of the message draft; must be of the type inputMessageText
- reply_to_message_id (
- Returns:
- DraftMessage
- Raises:
telegram.Error
-
ID= 'draftMessage'¶
-
static
read(q: dict, *args) → pytglib.api.types.draft_message.DraftMessage¶
pytglib.api.types.email_address_authentication_code_info module¶
-
class
pytglib.api.types.email_address_authentication_code_info.EmailAddressAuthenticationCodeInfo(email_address_pattern, length, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectInformation about the email address authentication code that was sent
- Attributes:
- ID (
str):EmailAddressAuthenticationCodeInfo - Args:
- email_address_pattern (
str): - Pattern of the email address to which an authentication code was sent
- length (
int): - Length of the code; 0 if unknown
- email_address_pattern (
- Returns:
- EmailAddressAuthenticationCodeInfo
- Raises:
telegram.Error
-
ID= 'emailAddressAuthenticationCodeInfo'¶
-
static
read(q: dict, *args) → pytglib.api.types.email_address_authentication_code_info.EmailAddressAuthenticationCodeInfo¶
pytglib.api.types.emojis module¶
-
class
pytglib.api.types.emojis.Emojis(emojis, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents a list of emoji
- Attributes:
- ID (
str):Emojis - Args:
- emojis (List of
str): - List of emojis
- emojis (List of
- Returns:
- Emojis
- Raises:
telegram.Error
-
ID= 'emojis'¶
-
static
read(q: dict, *args) → pytglib.api.types.emojis.Emojis¶
pytglib.api.types.encrypted_credentials module¶
-
class
pytglib.api.types.encrypted_credentials.EncryptedCredentials(data, hash, secret, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains encrypted Telegram Passport data credentials
- Attributes:
- ID (
str):EncryptedCredentials - Args:
- data (
bytes): - The encrypted credentials
- hash (
bytes): - The decrypted data hash
- secret (
bytes): - Secret for data decryption, encrypted with the service’s public key
- data (
- Returns:
- EncryptedCredentials
- Raises:
telegram.Error
-
ID= 'encryptedCredentials'¶
-
static
read(q: dict, *args) → pytglib.api.types.encrypted_credentials.EncryptedCredentials¶
pytglib.api.types.encrypted_passport_element module¶
-
class
pytglib.api.types.encrypted_passport_element.EncryptedPassportElement(type, data, front_side, reverse_side, selfie, translation, files, value, hash, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains information about an encrypted Telegram Passport element; for bots only
- Attributes:
- ID (
str):EncryptedPassportElement - Args:
- type (
telegram.api.types.PassportElementType): - Type of Telegram Passport element
- data (
bytes): - Encrypted JSON-encoded data about the user
- front_side (
telegram.api.types.datedFile): - The front side of an identity document
- reverse_side (
telegram.api.types.datedFile): - The reverse side of an identity document; may be null
- selfie (
telegram.api.types.datedFile): - Selfie with the document; may be null
- translation (List of
telegram.api.types.datedFile): - List of files containing a certified English translation of the document
- files (List of
telegram.api.types.datedFile): - List of attached files
- value (
str): - Unencrypted data, phone number or email address
- hash (
str): - Hash of the entire element
- type (
- Returns:
- EncryptedPassportElement
- Raises:
telegram.Error
-
ID= 'encryptedPassportElement'¶
-
static
read(q: dict, *args) → pytglib.api.types.encrypted_passport_element.EncryptedPassportElement¶
pytglib.api.types.error module¶
-
class
pytglib.api.types.error.Error(code, message, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectAn object of this type can be returned on every function call, in case of an error
- Attributes:
- ID (
str):Error - Args:
- code (
int): - Error code; subject to future changesIf the error code is 406, the error message must not be processed in any way and must not be displayed to the user
- message (
str): - Error message; subject to future changes
- code (
- Returns:
- Error
- Raises:
telegram.Error
-
ID= 'error'¶
-
static
read(q: dict, *args) → pytglib.api.types.error.Error¶
pytglib.api.types.file module¶
-
class
pytglib.api.types.file.File(id, size, expected_size, local, remote, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents a file
- Attributes:
- ID (
str):File - Args:
- id (
int): - Unique file identifier
- size (
int): - File size, in bytes; 0 if unknown
- expected_size (
int): - Approximate file size in bytes in case the exact file size is unknownCan be used to show download/upload progress
- local (
telegram.api.types.localFile): - Information about the local copy of the file
- remote (
telegram.api.types.remoteFile): - Information about the remote copy of the file
- id (
- Returns:
- File
- Raises:
telegram.Error
-
ID= 'file'¶
-
static
read(q: dict, *args) → pytglib.api.types.file.File¶
pytglib.api.types.file_part module¶
-
class
pytglib.api.types.file_part.FilePart(data, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains a part of a file
- Attributes:
- ID (
str):FilePart - Args:
- data (
bytes): - File bytes
- data (
- Returns:
- FilePart
- Raises:
telegram.Error
-
ID= 'filePart'¶
-
static
read(q: dict, *args) → pytglib.api.types.file_part.FilePart¶
pytglib.api.types.file_type module¶
-
class
pytglib.api.types.file_type.FileType(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents the type of a file
No parameters required.
-
ID= 'fileType'¶
-
static
read(q: dict, *args) → FileTypeNone or FileTypeSecret or FileTypeSecretThumbnail or FileTypeThumbnail or FileTypePhoto or FileTypeVoiceNote or FileTypeWallpaper or FileTypeAnimation or FileTypeProfilePhoto or FileTypeDocument or FileTypeSecure or FileTypeSticker or FileTypeAudio or FileTypeUnknown or FileTypeVideoNote or FileTypeNotificationSound or FileTypeVideo¶
-
pytglib.api.types.file_type_animation module¶
-
class
pytglib.api.types.file_type_animation.FileTypeAnimation(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe file is an animation
- Attributes:
- ID (
str):FileTypeAnimation
No parameters required.
- Returns:
- FileType
- Raises:
telegram.Error
-
ID= 'fileTypeAnimation'¶
-
static
read(q: dict, *args) → pytglib.api.types.file_type_animation.FileTypeAnimation¶
pytglib.api.types.file_type_audio module¶
-
class
pytglib.api.types.file_type_audio.FileTypeAudio(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe file is an audio file
- Attributes:
- ID (
str):FileTypeAudio
No parameters required.
- Returns:
- FileType
- Raises:
telegram.Error
-
ID= 'fileTypeAudio'¶
-
static
read(q: dict, *args) → pytglib.api.types.file_type_audio.FileTypeAudio¶
pytglib.api.types.file_type_document module¶
-
class
pytglib.api.types.file_type_document.FileTypeDocument(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe file is a document
- Attributes:
- ID (
str):FileTypeDocument
No parameters required.
- Returns:
- FileType
- Raises:
telegram.Error
-
ID= 'fileTypeDocument'¶
-
static
read(q: dict, *args) → pytglib.api.types.file_type_document.FileTypeDocument¶
pytglib.api.types.file_type_none module¶
-
class
pytglib.api.types.file_type_none.FileTypeNone(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe data is not a file
- Attributes:
- ID (
str):FileTypeNone
No parameters required.
- Returns:
- FileType
- Raises:
telegram.Error
-
ID= 'fileTypeNone'¶
-
static
read(q: dict, *args) → pytglib.api.types.file_type_none.FileTypeNone¶
pytglib.api.types.file_type_photo module¶
-
class
pytglib.api.types.file_type_photo.FileTypePhoto(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe file is a photo
- Attributes:
- ID (
str):FileTypePhoto
No parameters required.
- Returns:
- FileType
- Raises:
telegram.Error
-
ID= 'fileTypePhoto'¶
-
static
read(q: dict, *args) → pytglib.api.types.file_type_photo.FileTypePhoto¶
pytglib.api.types.file_type_profile_photo module¶
-
class
pytglib.api.types.file_type_profile_photo.FileTypeProfilePhoto(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe file is a profile photo
- Attributes:
- ID (
str):FileTypeProfilePhoto
No parameters required.
- Returns:
- FileType
- Raises:
telegram.Error
-
ID= 'fileTypeProfilePhoto'¶
-
static
read(q: dict, *args) → pytglib.api.types.file_type_profile_photo.FileTypeProfilePhoto¶
pytglib.api.types.file_type_secret module¶
-
class
pytglib.api.types.file_type_secret.FileTypeSecret(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe file was sent to a secret chat (the file type is not known to the server)
- Attributes:
- ID (
str):FileTypeSecret
No parameters required.
- Returns:
- FileType
- Raises:
telegram.Error
-
ID= 'fileTypeSecret'¶
-
static
read(q: dict, *args) → pytglib.api.types.file_type_secret.FileTypeSecret¶
pytglib.api.types.file_type_secret_thumbnail module¶
-
class
pytglib.api.types.file_type_secret_thumbnail.FileTypeSecretThumbnail(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe file is a thumbnail of a file from a secret chat
- Attributes:
- ID (
str):FileTypeSecretThumbnail
No parameters required.
- Returns:
- FileType
- Raises:
telegram.Error
-
ID= 'fileTypeSecretThumbnail'¶
-
static
read(q: dict, *args) → pytglib.api.types.file_type_secret_thumbnail.FileTypeSecretThumbnail¶
pytglib.api.types.file_type_secure module¶
-
class
pytglib.api.types.file_type_secure.FileTypeSecure(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe file is a file from Secure storage used for storing Telegram Passport files
- Attributes:
- ID (
str):FileTypeSecure
No parameters required.
- Returns:
- FileType
- Raises:
telegram.Error
-
ID= 'fileTypeSecure'¶
-
static
read(q: dict, *args) → pytglib.api.types.file_type_secure.FileTypeSecure¶
pytglib.api.types.file_type_sticker module¶
-
class
pytglib.api.types.file_type_sticker.FileTypeSticker(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe file is a sticker
- Attributes:
- ID (
str):FileTypeSticker
No parameters required.
- Returns:
- FileType
- Raises:
telegram.Error
-
ID= 'fileTypeSticker'¶
-
static
read(q: dict, *args) → pytglib.api.types.file_type_sticker.FileTypeSticker¶
pytglib.api.types.file_type_thumbnail module¶
-
class
pytglib.api.types.file_type_thumbnail.FileTypeThumbnail(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe file is a thumbnail of another file
- Attributes:
- ID (
str):FileTypeThumbnail
No parameters required.
- Returns:
- FileType
- Raises:
telegram.Error
-
ID= 'fileTypeThumbnail'¶
-
static
read(q: dict, *args) → pytglib.api.types.file_type_thumbnail.FileTypeThumbnail¶
pytglib.api.types.file_type_unknown module¶
-
class
pytglib.api.types.file_type_unknown.FileTypeUnknown(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe file type is not yet known
- Attributes:
- ID (
str):FileTypeUnknown
No parameters required.
- Returns:
- FileType
- Raises:
telegram.Error
-
ID= 'fileTypeUnknown'¶
-
static
read(q: dict, *args) → pytglib.api.types.file_type_unknown.FileTypeUnknown¶
pytglib.api.types.file_type_video module¶
-
class
pytglib.api.types.file_type_video.FileTypeVideo(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe file is a video
- Attributes:
- ID (
str):FileTypeVideo
No parameters required.
- Returns:
- FileType
- Raises:
telegram.Error
-
ID= 'fileTypeVideo'¶
-
static
read(q: dict, *args) → pytglib.api.types.file_type_video.FileTypeVideo¶
pytglib.api.types.file_type_video_note module¶
-
class
pytglib.api.types.file_type_video_note.FileTypeVideoNote(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe file is a video note
- Attributes:
- ID (
str):FileTypeVideoNote
No parameters required.
- Returns:
- FileType
- Raises:
telegram.Error
-
ID= 'fileTypeVideoNote'¶
-
static
read(q: dict, *args) → pytglib.api.types.file_type_video_note.FileTypeVideoNote¶
pytglib.api.types.file_type_voice_note module¶
-
class
pytglib.api.types.file_type_voice_note.FileTypeVoiceNote(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe file is a voice note
- Attributes:
- ID (
str):FileTypeVoiceNote
No parameters required.
- Returns:
- FileType
- Raises:
telegram.Error
-
ID= 'fileTypeVoiceNote'¶
-
static
read(q: dict, *args) → pytglib.api.types.file_type_voice_note.FileTypeVoiceNote¶
pytglib.api.types.file_type_wallpaper module¶
-
class
pytglib.api.types.file_type_wallpaper.FileTypeWallpaper(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe file is a wallpaper or a background pattern
- Attributes:
- ID (
str):FileTypeWallpaper
No parameters required.
- Returns:
- FileType
- Raises:
telegram.Error
-
ID= 'fileTypeWallpaper'¶
-
static
read(q: dict, *args) → pytglib.api.types.file_type_wallpaper.FileTypeWallpaper¶
pytglib.api.types.formatted_text module¶
-
class
pytglib.api.types.formatted_text.FormattedText(text, entities, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA text with some entities
- Attributes:
- ID (
str):FormattedText - Args:
- text (
str): - The text
- entities (List of
telegram.api.types.textEntity): - Entities contained in the textEntities can be nested, but must not mutually intersect with each otherPre, Code and PreCode entities can’t contain other entitiesBold, Italic, Underline, Strikethrough, and Spoiler entities can contain and to be contained in all other entitiesAll other entities can’t contain each other
- text (
- Returns:
- FormattedText
- Raises:
telegram.Error
-
ID= 'formattedText'¶
-
static
read(q: dict, *args) → pytglib.api.types.formatted_text.FormattedText¶
pytglib.api.types.found_messages module¶
-
class
pytglib.api.types.found_messages.FoundMessages(total_count, messages, next_offset, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains a list of messages found by a search
- Attributes:
- ID (
str):FoundMessages - Args:
- total_count (
int): - Approximate total number of messages found; -1 if unknown
- messages (List of
telegram.api.types.message): - List of messages
- next_offset (
str): - The offset for the next requestIf empty, there are no more results
- total_count (
- Returns:
- FoundMessages
- Raises:
telegram.Error
-
ID= 'foundMessages'¶
-
static
read(q: dict, *args) → pytglib.api.types.found_messages.FoundMessages¶
pytglib.api.types.game module¶
-
class
pytglib.api.types.game.Game(id, short_name, title, text, description, photo, animation, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectDescribes a game
- Attributes:
- ID (
str):Game - Args:
- id (
int): - Game ID
- short_name (
str): - Game short nameTo share a game use the URL https://tme/{bot_username}?game={game_short_name}
- title (
str): - Game title
- text (
telegram.api.types.formattedText): - Game text, usually containing scoreboards for a game
- description (
str): - Game description
- photo (
telegram.api.types.photo): - Game photo
- animation (
telegram.api.types.animation): - Game animation; may be null
- id (
- Returns:
- Game
- Raises:
telegram.Error
-
ID= 'game'¶
-
static
read(q: dict, *args) → pytglib.api.types.game.Game¶
pytglib.api.types.game_high_score module¶
-
class
pytglib.api.types.game_high_score.GameHighScore(position, user_id, score, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains one row of the game high score table
- Attributes:
- ID (
str):GameHighScore - Args:
- position (
int): - Position in the high score table
- user_id (
int): - User identifier
- score (
int): - User score
- position (
- Returns:
- GameHighScore
- Raises:
telegram.Error
-
ID= 'gameHighScore'¶
-
static
read(q: dict, *args) → pytglib.api.types.game_high_score.GameHighScore¶
pytglib.api.types.game_high_scores module¶
-
class
pytglib.api.types.game_high_scores.GameHighScores(scores, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains a list of game high scores
- Attributes:
- ID (
str):GameHighScores - Args:
- scores (List of
telegram.api.types.gameHighScore): - A list of game high scores
- scores (List of
- Returns:
- GameHighScores
- Raises:
telegram.Error
-
ID= 'gameHighScores'¶
-
static
read(q: dict, *args) → pytglib.api.types.game_high_scores.GameHighScores¶
pytglib.api.types.hashtags module¶
Bases:
pytglib.api.utils.object.ObjectContains a list of hashtags
- Attributes:
- ID (
str):Hashtags - Args:
- hashtags (List of
str): - A list of hashtags
- hashtags (List of
- Returns:
- Hashtags
- Raises:
telegram.Error
pytglib.api.types.http_url module¶
-
class
pytglib.api.types.http_url.HttpUrl(url, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains an HTTP URL
- Attributes:
- ID (
str):HttpUrl - Args:
- url (
str): - The URL
- url (
- Returns:
- HttpUrl
- Raises:
telegram.Error
-
ID= 'httpUrl'¶
-
static
read(q: dict, *args) → pytglib.api.types.http_url.HttpUrl¶
pytglib.api.types.identity_document module¶
-
class
pytglib.api.types.identity_document.IdentityDocument(number, expiry_date, front_side, reverse_side, selfie, translation, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectAn identity document
- Attributes:
- ID (
str):IdentityDocument - Args:
- number (
str): - Document number; 1-24 characters
- expiry_date (
telegram.api.types.date): - Document expiry date; may be null if not applicable
- front_side (
telegram.api.types.datedFile): - Front side of the document
- reverse_side (
telegram.api.types.datedFile): - Reverse side of the document; only for driver license and identity card; may be null
- selfie (
telegram.api.types.datedFile): - Selfie with the document; may be null
- translation (List of
telegram.api.types.datedFile): - List of files containing a certified English translation of the document
- number (
- Returns:
- IdentityDocument
- Raises:
telegram.Error
-
ID= 'identityDocument'¶
-
static
read(q: dict, *args) → pytglib.api.types.identity_document.IdentityDocument¶
pytglib.api.types.imported_contacts module¶
-
class
pytglib.api.types.imported_contacts.ImportedContacts(user_ids, importer_count, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents the result of an ImportContacts request
- Attributes:
- ID (
str):ImportedContacts - Args:
- user_ids (List of
int): - User identifiers of the imported contacts in the same order as they were specified in the request; 0 if the contact is not yet a registered user
- importer_count (List of
int): - The number of users that imported the corresponding contact; 0 for already registered users or if unavailable
- user_ids (List of
- Returns:
- ImportedContacts
- Raises:
telegram.Error
-
ID= 'importedContacts'¶
-
static
read(q: dict, *args) → pytglib.api.types.imported_contacts.ImportedContacts¶
pytglib.api.types.inline_keyboard_button module¶
Bases:
pytglib.api.utils.object.ObjectRepresents a single button in an inline keyboard
- Attributes:
- ID (
str):InlineKeyboardButton - Args:
- text (
str): - Text of the button
- type (
telegram.api.types.InlineKeyboardButtonType): - Type of the button
- text (
- Returns:
- InlineKeyboardButton
- Raises:
telegram.Error
pytglib.api.types.inline_keyboard_button_type module¶
Bases:
pytglib.api.utils.object.ObjectDescribes the type of an inline keyboard button
No parameters required.
pytglib.api.types.inline_keyboard_button_type_buy module¶
Bases:
pytglib.api.utils.object.ObjectA button to buy something. This button must be in the first column and row of the keyboard and can be attached only to a message with content of the type messageInvoice
- Attributes:
- ID (
str):InlineKeyboardButtonTypeBuy
No parameters required.
- Returns:
- InlineKeyboardButtonType
- Raises:
telegram.Error
pytglib.api.types.inline_keyboard_button_type_callback module¶
Bases:
pytglib.api.utils.object.ObjectA button that sends a callback query to a bot
- Attributes:
- ID (
str):InlineKeyboardButtonTypeCallback - Args:
- data (
bytes): - Data to be sent to the bot via a callback query
- data (
- Returns:
- InlineKeyboardButtonType
- Raises:
telegram.Error
pytglib.api.types.inline_keyboard_button_type_callback_game module¶
Bases:
pytglib.api.utils.object.ObjectA button with a game that sends a callback query to a bot. This button must be in the first column and row of the keyboard and can be attached only to a message with content of the type messageGame
- Attributes:
- ID (
str):InlineKeyboardButtonTypeCallbackGame
No parameters required.
- Returns:
- InlineKeyboardButtonType
- Raises:
telegram.Error
pytglib.api.types.inline_keyboard_button_type_login_url module¶
Bases:
pytglib.api.utils.object.ObjectA button that opens a specified URL and automatically authorize the current user by calling getLoginUrlInfo
- Attributes:
- ID (
str):InlineKeyboardButtonTypeLoginUrl - Args:
- url (
str): - An HTTP URL to pass to getLoginUrlInfo
- id (
int): - Unique button identifier
- forward_text (
str): - If non-empty, new text of the button in forwarded messages
- url (
- Returns:
- InlineKeyboardButtonType
- Raises:
telegram.Error
pytglib.api.types.inline_keyboard_button_type_switch_inline module¶
Bases:
pytglib.api.utils.object.ObjectA button that forces an inline query to the bot to be inserted in the input field
- Attributes:
- ID (
str):InlineKeyboardButtonTypeSwitchInline - Args:
- query (
str): - Inline query to be sent to the bot
- in_current_chat (
bool): - True, if the inline query must be sent from the current chat
- query (
- Returns:
- InlineKeyboardButtonType
- Raises:
telegram.Error
pytglib.api.types.inline_keyboard_button_type_url module¶
Bases:
pytglib.api.utils.object.ObjectA button that opens a specified URL
- Attributes:
- ID (
str):InlineKeyboardButtonTypeUrl - Args:
- url (
str): - HTTP or tg:// URL to open
- url (
- Returns:
- InlineKeyboardButtonType
- Raises:
telegram.Error
pytglib.api.types.inline_query_result module¶
-
class
pytglib.api.types.inline_query_result.InlineQueryResult(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents a single result of an inline query
No parameters required.
-
ID= 'inlineQueryResult'¶
-
static
read(q: dict, *args) → InlineQueryResultVoiceNote or InlineQueryResultAudio or InlineQueryResultVideo or InlineQueryResultVenue or InlineQueryResultDocument or InlineQueryResultContact or InlineQueryResultPhoto or InlineQueryResultSticker or InlineQueryResultGame or InlineQueryResultArticle or InlineQueryResultLocation or InlineQueryResultAnimation¶
-
pytglib.api.types.inline_query_result_animation module¶
-
class
pytglib.api.types.inline_query_result_animation.InlineQueryResultAnimation(id, animation, title, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents an animation file
- Attributes:
- ID (
str):InlineQueryResultAnimation - Args:
- id (
str): - Unique identifier of the query result
- animation (
telegram.api.types.animation): - Animation file
- title (
str): - Animation title
- id (
- Returns:
- InlineQueryResult
- Raises:
telegram.Error
-
ID= 'inlineQueryResultAnimation'¶
-
static
read(q: dict, *args) → pytglib.api.types.inline_query_result_animation.InlineQueryResultAnimation¶
pytglib.api.types.inline_query_result_article module¶
-
class
pytglib.api.types.inline_query_result_article.InlineQueryResultArticle(id, url, hide_url, title, description, thumbnail, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents a link to an article or web page
- Attributes:
- ID (
str):InlineQueryResultArticle - Args:
- id (
str): - Unique identifier of the query result
- url (
str): - URL of the result, if it exists
- hide_url (
bool): - True, if the URL must be not shown
- title (
str): - Title of the result
- description (
str): - A short description of the result
- thumbnail (
telegram.api.types.thumbnail): - Result thumbnail in JPEG format; may be null
- id (
- Returns:
- InlineQueryResult
- Raises:
telegram.Error
-
ID= 'inlineQueryResultArticle'¶
-
static
read(q: dict, *args) → pytglib.api.types.inline_query_result_article.InlineQueryResultArticle¶
pytglib.api.types.inline_query_result_audio module¶
-
class
pytglib.api.types.inline_query_result_audio.InlineQueryResultAudio(id, audio, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents an audio file
- Attributes:
- ID (
str):InlineQueryResultAudio - Args:
- id (
str): - Unique identifier of the query result
- audio (
telegram.api.types.audio): - Audio file
- id (
- Returns:
- InlineQueryResult
- Raises:
telegram.Error
-
ID= 'inlineQueryResultAudio'¶
-
static
read(q: dict, *args) → pytglib.api.types.inline_query_result_audio.InlineQueryResultAudio¶
pytglib.api.types.inline_query_result_contact module¶
-
class
pytglib.api.types.inline_query_result_contact.InlineQueryResultContact(id, contact, thumbnail, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents a user contact
- Attributes:
- ID (
str):InlineQueryResultContact - Args:
- id (
str): - Unique identifier of the query result
- contact (
telegram.api.types.contact): - A user contact
- thumbnail (
telegram.api.types.thumbnail): - Result thumbnail in JPEG format; may be null
- id (
- Returns:
- InlineQueryResult
- Raises:
telegram.Error
-
ID= 'inlineQueryResultContact'¶
-
static
read(q: dict, *args) → pytglib.api.types.inline_query_result_contact.InlineQueryResultContact¶
pytglib.api.types.inline_query_result_document module¶
-
class
pytglib.api.types.inline_query_result_document.InlineQueryResultDocument(id, document, title, description, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents a document
- Attributes:
- ID (
str):InlineQueryResultDocument - Args:
- id (
str): - Unique identifier of the query result
- document (
telegram.api.types.document): - Document
- title (
str): - Document title
- description (
str): - Document description
- id (
- Returns:
- InlineQueryResult
- Raises:
telegram.Error
-
ID= 'inlineQueryResultDocument'¶
-
static
read(q: dict, *args) → pytglib.api.types.inline_query_result_document.InlineQueryResultDocument¶
pytglib.api.types.inline_query_result_game module¶
-
class
pytglib.api.types.inline_query_result_game.InlineQueryResultGame(id, game, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents information about a game
- Attributes:
- ID (
str):InlineQueryResultGame - Args:
- id (
str): - Unique identifier of the query result
- game (
telegram.api.types.game): - Game result
- id (
- Returns:
- InlineQueryResult
- Raises:
telegram.Error
-
ID= 'inlineQueryResultGame'¶
-
static
read(q: dict, *args) → pytglib.api.types.inline_query_result_game.InlineQueryResultGame¶
pytglib.api.types.inline_query_result_location module¶
-
class
pytglib.api.types.inline_query_result_location.InlineQueryResultLocation(id, location, title, thumbnail, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents a point on the map
- Attributes:
- ID (
str):InlineQueryResultLocation - Args:
- id (
str): - Unique identifier of the query result
- location (
telegram.api.types.location): - Location result
- title (
str): - Title of the result
- thumbnail (
telegram.api.types.thumbnail): - Result thumbnail in JPEG format; may be null
- id (
- Returns:
- InlineQueryResult
- Raises:
telegram.Error
-
ID= 'inlineQueryResultLocation'¶
-
static
read(q: dict, *args) → pytglib.api.types.inline_query_result_location.InlineQueryResultLocation¶
pytglib.api.types.inline_query_result_photo module¶
-
class
pytglib.api.types.inline_query_result_photo.InlineQueryResultPhoto(id, photo, title, description, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents a photo
- Attributes:
- ID (
str):InlineQueryResultPhoto - Args:
- id (
str): - Unique identifier of the query result
- photo (
telegram.api.types.photo): - Photo
- title (
str): - Title of the result, if known
- description (
str): - A short description of the result, if known
- id (
- Returns:
- InlineQueryResult
- Raises:
telegram.Error
-
ID= 'inlineQueryResultPhoto'¶
-
static
read(q: dict, *args) → pytglib.api.types.inline_query_result_photo.InlineQueryResultPhoto¶
pytglib.api.types.inline_query_result_sticker module¶
-
class
pytglib.api.types.inline_query_result_sticker.InlineQueryResultSticker(id, sticker, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents a sticker
- Attributes:
- ID (
str):InlineQueryResultSticker - Args:
- id (
str): - Unique identifier of the query result
- sticker (
telegram.api.types.sticker): - Sticker
- id (
- Returns:
- InlineQueryResult
- Raises:
telegram.Error
-
ID= 'inlineQueryResultSticker'¶
-
static
read(q: dict, *args) → pytglib.api.types.inline_query_result_sticker.InlineQueryResultSticker¶
pytglib.api.types.inline_query_result_venue module¶
-
class
pytglib.api.types.inline_query_result_venue.InlineQueryResultVenue(id, venue, thumbnail, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents information about a venue
- Attributes:
- ID (
str):InlineQueryResultVenue - Args:
- id (
str): - Unique identifier of the query result
- venue (
telegram.api.types.venue): - Venue result
- thumbnail (
telegram.api.types.thumbnail): - Result thumbnail in JPEG format; may be null
- id (
- Returns:
- InlineQueryResult
- Raises:
telegram.Error
-
ID= 'inlineQueryResultVenue'¶
-
static
read(q: dict, *args) → pytglib.api.types.inline_query_result_venue.InlineQueryResultVenue¶
pytglib.api.types.inline_query_result_video module¶
-
class
pytglib.api.types.inline_query_result_video.InlineQueryResultVideo(id, video, title, description, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents a video
- Attributes:
- ID (
str):InlineQueryResultVideo - Args:
- id (
str): - Unique identifier of the query result
- video (
telegram.api.types.video): - Video
- title (
str): - Title of the video
- description (
str): - Description of the video
- id (
- Returns:
- InlineQueryResult
- Raises:
telegram.Error
-
ID= 'inlineQueryResultVideo'¶
-
static
read(q: dict, *args) → pytglib.api.types.inline_query_result_video.InlineQueryResultVideo¶
pytglib.api.types.inline_query_result_voice_note module¶
-
class
pytglib.api.types.inline_query_result_voice_note.InlineQueryResultVoiceNote(id, voice_note, title, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents a voice note
- Attributes:
- ID (
str):InlineQueryResultVoiceNote - Args:
- id (
str): - Unique identifier of the query result
- voice_note (
telegram.api.types.voiceNote): - Voice note
- title (
str): - Title of the voice note
- id (
- Returns:
- InlineQueryResult
- Raises:
telegram.Error
-
ID= 'inlineQueryResultVoiceNote'¶
-
static
read(q: dict, *args) → pytglib.api.types.inline_query_result_voice_note.InlineQueryResultVoiceNote¶
pytglib.api.types.inline_query_results module¶
-
class
pytglib.api.types.inline_query_results.InlineQueryResults(inline_query_id, next_offset, results, switch_pm_text, switch_pm_parameter, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents the results of the inline query. Use sendInlineQueryResultMessage to send the result of the query
- Attributes:
- ID (
str):InlineQueryResults - Args:
- inline_query_id (
int): - Unique identifier of the inline query
- next_offset (
str): - The offset for the next requestIf empty, there are no more results
- results (List of
telegram.api.types.InlineQueryResult): - Results of the query
- switch_pm_text (
str): - If non-empty, this text must be shown on the button, which opens a private chat with the bot and sends the bot a start message with the switch_pm_parameter
- switch_pm_parameter (
str): - Parameter for the bot start message
- inline_query_id (
- Returns:
- InlineQueryResults
- Raises:
telegram.Error
-
ID= 'inlineQueryResults'¶
-
static
read(q: dict, *args) → pytglib.api.types.inline_query_results.InlineQueryResults¶
pytglib.api.types.input_background module¶
-
class
pytglib.api.types.input_background.InputBackground(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains information about background to set
No parameters required.
-
ID= 'inputBackground'¶
-
static
read(q: dict, *args) → InputBackgroundLocal or InputBackgroundRemote¶
-
pytglib.api.types.input_background_local module¶
-
class
pytglib.api.types.input_background_local.InputBackgroundLocal(background, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA background from a local file
- Attributes:
- ID (
str):InputBackgroundLocal - Args:
- background (
telegram.api.types.InputFile): - Background file to useOnly inputFileLocal and inputFileGenerated are supportedThe file must be in JPEG format for wallpapers and in PNG format for patterns
- background (
- Returns:
- InputBackground
- Raises:
telegram.Error
-
ID= 'inputBackgroundLocal'¶
-
static
read(q: dict, *args) → pytglib.api.types.input_background_local.InputBackgroundLocal¶
pytglib.api.types.input_background_remote module¶
-
class
pytglib.api.types.input_background_remote.InputBackgroundRemote(background_id, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA background from the server
- Attributes:
- ID (
str):InputBackgroundRemote - Args:
- background_id (
int): - The background identifier
- background_id (
- Returns:
- InputBackground
- Raises:
telegram.Error
-
ID= 'inputBackgroundRemote'¶
-
static
read(q: dict, *args) → pytglib.api.types.input_background_remote.InputBackgroundRemote¶
pytglib.api.types.input_credentials module¶
-
class
pytglib.api.types.input_credentials.InputCredentials(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains information about the payment method chosen by the user
No parameters required.
-
ID= 'inputCredentials'¶
-
static
read(q: dict, *args) → InputCredentialsGooglePay or InputCredentialsApplePay or InputCredentialsSaved or InputCredentialsNew¶
-
pytglib.api.types.input_credentials_android_pay module¶
pytglib.api.types.input_credentials_apple_pay module¶
-
class
pytglib.api.types.input_credentials_apple_pay.InputCredentialsApplePay(data, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectApplies if a user enters new credentials using Apple Pay
- Attributes:
- ID (
str):InputCredentialsApplePay - Args:
- data (
str): - JSON-encoded data with the credential identifier
- data (
- Returns:
- InputCredentials
- Raises:
telegram.Error
-
ID= 'inputCredentialsApplePay'¶
-
static
read(q: dict, *args) → pytglib.api.types.input_credentials_apple_pay.InputCredentialsApplePay¶
pytglib.api.types.input_credentials_new module¶
-
class
pytglib.api.types.input_credentials_new.InputCredentialsNew(data, allow_save, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectApplies if a user enters new credentials on a payment provider website
- Attributes:
- ID (
str):InputCredentialsNew - Args:
- data (
str): - JSON-encoded data with the credential identifier from the payment provider
- allow_save (
bool): - True, if the credential identifier can be saved on the server side
- data (
- Returns:
- InputCredentials
- Raises:
telegram.Error
-
ID= 'inputCredentialsNew'¶
-
static
read(q: dict, *args) → pytglib.api.types.input_credentials_new.InputCredentialsNew¶
pytglib.api.types.input_credentials_saved module¶
-
class
pytglib.api.types.input_credentials_saved.InputCredentialsSaved(saved_credentials_id, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectApplies if a user chooses some previously saved payment credentials. To use their previously saved credentials, the user must have a valid temporary password
- Attributes:
- ID (
str):InputCredentialsSaved - Args:
- saved_credentials_id (
str): - Identifier of the saved credentials
- saved_credentials_id (
- Returns:
- InputCredentials
- Raises:
telegram.Error
-
ID= 'inputCredentialsSaved'¶
-
static
read(q: dict, *args) → pytglib.api.types.input_credentials_saved.InputCredentialsSaved¶
pytglib.api.types.input_file module¶
-
class
pytglib.api.types.input_file.InputFile(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectPoints to a file
No parameters required.
-
ID= 'inputFile'¶
-
static
read(q: dict, *args) → InputFileGenerated or InputFileId or InputFileRemote or InputFileLocal¶
-
pytglib.api.types.input_file_generated module¶
-
class
pytglib.api.types.input_file_generated.InputFileGenerated(original_path, conversion, expected_size, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA file generated by the application
- Attributes:
- ID (
str):InputFileGenerated - Args:
- original_path (
str): - Local path to a file from which the file is generated; may be empty if there is no such file
- conversion (
str): - String specifying the conversion applied to the original file; must be persistent across application restartsConversions beginning with ‘#’ are reserved for internal TDLib usage
- expected_size (
int): - Expected size of the generated file, in bytes; 0 if unknown
- original_path (
- Returns:
- InputFile
- Raises:
telegram.Error
-
ID= 'inputFileGenerated'¶
-
static
read(q: dict, *args) → pytglib.api.types.input_file_generated.InputFileGenerated¶
pytglib.api.types.input_file_id module¶
-
class
pytglib.api.types.input_file_id.InputFileId(id, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA file defined by its unique ID
- Attributes:
- ID (
str):InputFileId - Args:
- id (
int): - Unique file identifier
- id (
- Returns:
- InputFile
- Raises:
telegram.Error
-
ID= 'inputFileId'¶
-
static
read(q: dict, *args) → pytglib.api.types.input_file_id.InputFileId¶
pytglib.api.types.input_file_local module¶
-
class
pytglib.api.types.input_file_local.InputFileLocal(path, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA file defined by a local path
- Attributes:
- ID (
str):InputFileLocal - Args:
- path (
str): - Local path to the file
- path (
- Returns:
- InputFile
- Raises:
telegram.Error
-
ID= 'inputFileLocal'¶
-
static
read(q: dict, *args) → pytglib.api.types.input_file_local.InputFileLocal¶
pytglib.api.types.input_file_remote module¶
-
class
pytglib.api.types.input_file_remote.InputFileRemote(id, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA file defined by its remote ID. The remote ID is guaranteed to be usable only if the corresponding file is still accessible to the user and known to TDLib.For example, if the file is from a message, then the message must be not deleted and accessible to the user. If the file database is disabled, then the corresponding object with the file must be preloaded by the application
- Attributes:
- ID (
str):InputFileRemote - Args:
- id (
str): - Remote file identifier
- id (
- Returns:
- InputFile
- Raises:
telegram.Error
-
ID= 'inputFileRemote'¶
-
static
read(q: dict, *args) → pytglib.api.types.input_file_remote.InputFileRemote¶
pytglib.api.types.input_identity_document module¶
-
class
pytglib.api.types.input_identity_document.InputIdentityDocument(number, expiry_date, front_side, reverse_side, selfie, translation, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectAn identity document to be saved to Telegram Passport
- Attributes:
- ID (
str):InputIdentityDocument - Args:
- number (
str): - Document number; 1-24 characters
- expiry_date (
telegram.api.types.date): - Document expiry date; pass null if not applicable
- front_side (
telegram.api.types.InputFile): - Front side of the document
- reverse_side (
telegram.api.types.InputFile): - Reverse side of the document; only for driver license and identity card; pass null otherwise
- selfie (
telegram.api.types.InputFile): - Selfie with the document; pass null if unavailable
- translation (List of
telegram.api.types.InputFile): - List of files containing a certified English translation of the document
- number (
- Returns:
- InputIdentityDocument
- Raises:
telegram.Error
-
ID= 'inputIdentityDocument'¶
-
static
read(q: dict, *args) → pytglib.api.types.input_identity_document.InputIdentityDocument¶
pytglib.api.types.input_inline_query_result module¶
-
class
pytglib.api.types.input_inline_query_result.InputInlineQueryResult(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents a single result of an inline query; for bots only
No parameters required.
-
ID= 'inputInlineQueryResult'¶
-
static
read(q: dict, *args) → InputInlineQueryResultLocation or InputInlineQueryResultVenue or InputInlineQueryResultAudio or InputInlineQueryResultDocument or InputInlineQueryResultGame or InputInlineQueryResultSticker or InputInlineQueryResultVideo or InputInlineQueryResultPhoto or InputInlineQueryResultArticle or InputInlineQueryResultVoiceNote or InputInlineQueryResultContact or InputInlineQueryResultAnimation¶
-
pytglib.api.types.input_inline_query_result_animated_gif module¶
pytglib.api.types.input_inline_query_result_animated_mpeg4 module¶
pytglib.api.types.input_inline_query_result_article module¶
-
class
pytglib.api.types.input_inline_query_result_article.InputInlineQueryResultArticle(id, url, hide_url, title, description, thumbnail_url, thumbnail_width, thumbnail_height, reply_markup, input_message_content, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents a link to an article or web page
- Attributes:
- ID (
str):InputInlineQueryResultArticle - Args:
- id (
str): - Unique identifier of the query result
- url (
str): - URL of the result, if it exists
- hide_url (
bool): - True, if the URL must be not shown
- title (
str): - Title of the result
- description (
str): - A short description of the result
- thumbnail_url (
str): - URL of the result thumbnail, if it exists
- thumbnail_width (
int): - Thumbnail width, if known
- thumbnail_height (
int): - Thumbnail height, if known
- reply_markup (
telegram.api.types.ReplyMarkup): - The message reply markup; pass null if noneMust be of type replyMarkupInlineKeyboard or null
- input_message_content (
telegram.api.types.InputMessageContent): - The content of the message to be sentMust be one of the following types: inputMessageText, inputMessageInvoice, inputMessageLocation, inputMessageVenue or inputMessageContact
- id (
- Returns:
- InputInlineQueryResult
- Raises:
telegram.Error
-
ID= 'inputInlineQueryResultArticle'¶
-
static
read(q: dict, *args) → pytglib.api.types.input_inline_query_result_article.InputInlineQueryResultArticle¶
pytglib.api.types.input_inline_query_result_audio module¶
-
class
pytglib.api.types.input_inline_query_result_audio.InputInlineQueryResultAudio(id, title, performer, audio_url, audio_duration, reply_markup, input_message_content, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents a link to an MP3 audio file
- Attributes:
- ID (
str):InputInlineQueryResultAudio - Args:
- id (
str): - Unique identifier of the query result
- title (
str): - Title of the audio file
- performer (
str): - Performer of the audio file
- audio_url (
str): - The URL of the audio file
- audio_duration (
int): - Audio file duration, in seconds
- reply_markup (
telegram.api.types.ReplyMarkup): - The message reply markup; pass null if noneMust be of type replyMarkupInlineKeyboard or null
- input_message_content (
telegram.api.types.InputMessageContent): - The content of the message to be sentMust be one of the following types: inputMessageText, inputMessageAudio, inputMessageInvoice, inputMessageLocation, inputMessageVenue or inputMessageContact
- id (
- Returns:
- InputInlineQueryResult
- Raises:
telegram.Error
-
ID= 'inputInlineQueryResultAudio'¶
-
static
read(q: dict, *args) → pytglib.api.types.input_inline_query_result_audio.InputInlineQueryResultAudio¶
pytglib.api.types.input_inline_query_result_contact module¶
-
class
pytglib.api.types.input_inline_query_result_contact.InputInlineQueryResultContact(id, contact, thumbnail_url, thumbnail_width, thumbnail_height, reply_markup, input_message_content, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents a user contact
- Attributes:
- ID (
str):InputInlineQueryResultContact - Args:
- id (
str): - Unique identifier of the query result
- contact (
telegram.api.types.contact): - User contact
- thumbnail_url (
str): - URL of the result thumbnail, if it exists
- thumbnail_width (
int): - Thumbnail width, if known
- thumbnail_height (
int): - Thumbnail height, if known
- reply_markup (
telegram.api.types.ReplyMarkup): - The message reply markup; pass null if noneMust be of type replyMarkupInlineKeyboard or null
- input_message_content (
telegram.api.types.InputMessageContent): - The content of the message to be sentMust be one of the following types: inputMessageText, inputMessageInvoice, inputMessageLocation, inputMessageVenue or inputMessageContact
- id (
- Returns:
- InputInlineQueryResult
- Raises:
telegram.Error
-
ID= 'inputInlineQueryResultContact'¶
-
static
read(q: dict, *args) → pytglib.api.types.input_inline_query_result_contact.InputInlineQueryResultContact¶
pytglib.api.types.input_inline_query_result_document module¶
-
class
pytglib.api.types.input_inline_query_result_document.InputInlineQueryResultDocument(id, title, description, document_url, mime_type, thumbnail_url, thumbnail_width, thumbnail_height, reply_markup, input_message_content, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents a link to a file
- Attributes:
- ID (
str):InputInlineQueryResultDocument - Args:
- id (
str): - Unique identifier of the query result
- title (
str): - Title of the resulting file
- description (
str): - Short description of the result, if known
- document_url (
str): - URL of the file
- mime_type (
str): - MIME type of the file content; only “application/pdf” and “application/zip” are currently allowed
- thumbnail_url (
str): - The URL of the file thumbnail, if it exists
- thumbnail_width (
int): - Width of the thumbnail
- thumbnail_height (
int): - Height of the thumbnail
- reply_markup (
telegram.api.types.ReplyMarkup): - The message reply markup; pass null if noneMust be of type replyMarkupInlineKeyboard or null
- input_message_content (
telegram.api.types.InputMessageContent): - The content of the message to be sentMust be one of the following types: inputMessageText, inputMessageDocument, inputMessageInvoice, inputMessageLocation, inputMessageVenue or inputMessageContact
- id (
- Returns:
- InputInlineQueryResult
- Raises:
telegram.Error
-
ID= 'inputInlineQueryResultDocument'¶
-
static
read(q: dict, *args) → pytglib.api.types.input_inline_query_result_document.InputInlineQueryResultDocument¶
pytglib.api.types.input_inline_query_result_game module¶
-
class
pytglib.api.types.input_inline_query_result_game.InputInlineQueryResultGame(id, game_short_name, reply_markup, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents a game
- Attributes:
- ID (
str):InputInlineQueryResultGame - Args:
- id (
str): - Unique identifier of the query result
- game_short_name (
str): - Short name of the game
- reply_markup (
telegram.api.types.ReplyMarkup): - The message reply markup; pass null if noneMust be of type replyMarkupInlineKeyboard or null
- id (
- Returns:
- InputInlineQueryResult
- Raises:
telegram.Error
-
ID= 'inputInlineQueryResultGame'¶
-
static
read(q: dict, *args) → pytglib.api.types.input_inline_query_result_game.InputInlineQueryResultGame¶
pytglib.api.types.input_inline_query_result_location module¶
-
class
pytglib.api.types.input_inline_query_result_location.InputInlineQueryResultLocation(id, location, live_period, title, thumbnail_url, thumbnail_width, thumbnail_height, reply_markup, input_message_content, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents a point on the map
- Attributes:
- ID (
str):InputInlineQueryResultLocation - Args:
- id (
str): - Unique identifier of the query result
- location (
telegram.api.types.location): - Location result
- live_period (
int): - Amount of time relative to the message sent time until the location can be updated, in seconds
- title (
str): - Title of the result
- thumbnail_url (
str): - URL of the result thumbnail, if it exists
- thumbnail_width (
int): - Thumbnail width, if known
- thumbnail_height (
int): - Thumbnail height, if known
- reply_markup (
telegram.api.types.ReplyMarkup): - The message reply markup; pass null if noneMust be of type replyMarkupInlineKeyboard or null
- input_message_content (
telegram.api.types.InputMessageContent): - The content of the message to be sentMust be one of the following types: inputMessageText, inputMessageInvoice, inputMessageLocation, inputMessageVenue or inputMessageContact
- id (
- Returns:
- InputInlineQueryResult
- Raises:
telegram.Error
-
ID= 'inputInlineQueryResultLocation'¶
-
static
read(q: dict, *args) → pytglib.api.types.input_inline_query_result_location.InputInlineQueryResultLocation¶
pytglib.api.types.input_inline_query_result_photo module¶
-
class
pytglib.api.types.input_inline_query_result_photo.InputInlineQueryResultPhoto(id, title, description, thumbnail_url, photo_url, photo_width, photo_height, reply_markup, input_message_content, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents link to a JPEG image
- Attributes:
- ID (
str):InputInlineQueryResultPhoto - Args:
- id (
str): - Unique identifier of the query result
- title (
str): - Title of the result, if known
- description (
str): - A short description of the result, if known
- thumbnail_url (
str): - URL of the photo thumbnail, if it exists
- photo_url (
str): - The URL of the JPEG photo (photo size must not exceed 5MB)
- photo_width (
int): - Width of the photo
- photo_height (
int): - Height of the photo
- reply_markup (
telegram.api.types.ReplyMarkup): - The message reply markup; pass null if noneMust be of type replyMarkupInlineKeyboard or null
- input_message_content (
telegram.api.types.InputMessageContent): - The content of the message to be sentMust be one of the following types: inputMessageText, inputMessagePhoto, inputMessageInvoice, inputMessageLocation, inputMessageVenue or inputMessageContact
- id (
- Returns:
- InputInlineQueryResult
- Raises:
telegram.Error
-
ID= 'inputInlineQueryResultPhoto'¶
-
static
read(q: dict, *args) → pytglib.api.types.input_inline_query_result_photo.InputInlineQueryResultPhoto¶
pytglib.api.types.input_inline_query_result_sticker module¶
-
class
pytglib.api.types.input_inline_query_result_sticker.InputInlineQueryResultSticker(id, thumbnail_url, sticker_url, sticker_width, sticker_height, reply_markup, input_message_content, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents a link to a WEBP, TGS, or WEBM sticker
- Attributes:
- ID (
str):InputInlineQueryResultSticker - Args:
- id (
str): - Unique identifier of the query result
- thumbnail_url (
str): - URL of the sticker thumbnail, if it exists
- sticker_url (
str): - The URL of the WEBP, TGS, or WEBM sticker (sticker file size must not exceed 5MB)
- sticker_width (
int): - Width of the sticker
- sticker_height (
int): - Height of the sticker
- reply_markup (
telegram.api.types.ReplyMarkup): - The message reply markup; pass null if noneMust be of type replyMarkupInlineKeyboard or null
- input_message_content (
telegram.api.types.InputMessageContent): - The content of the message to be sentMust be one of the following types: inputMessageText, inputMessageSticker, inputMessageInvoice, inputMessageLocation, inputMessageVenue or inputMessageContact
- id (
- Returns:
- InputInlineQueryResult
- Raises:
telegram.Error
-
ID= 'inputInlineQueryResultSticker'¶
-
static
read(q: dict, *args) → pytglib.api.types.input_inline_query_result_sticker.InputInlineQueryResultSticker¶
pytglib.api.types.input_inline_query_result_venue module¶
-
class
pytglib.api.types.input_inline_query_result_venue.InputInlineQueryResultVenue(id, venue, thumbnail_url, thumbnail_width, thumbnail_height, reply_markup, input_message_content, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents information about a venue
- Attributes:
- ID (
str):InputInlineQueryResultVenue - Args:
- id (
str): - Unique identifier of the query result
- venue (
telegram.api.types.venue): - Venue result
- thumbnail_url (
str): - URL of the result thumbnail, if it exists
- thumbnail_width (
int): - Thumbnail width, if known
- thumbnail_height (
int): - Thumbnail height, if known
- reply_markup (
telegram.api.types.ReplyMarkup): - The message reply markup; pass null if noneMust be of type replyMarkupInlineKeyboard or null
- input_message_content (
telegram.api.types.InputMessageContent): - The content of the message to be sentMust be one of the following types: inputMessageText, inputMessageInvoice, inputMessageLocation, inputMessageVenue or inputMessageContact
- id (
- Returns:
- InputInlineQueryResult
- Raises:
telegram.Error
-
ID= 'inputInlineQueryResultVenue'¶
-
static
read(q: dict, *args) → pytglib.api.types.input_inline_query_result_venue.InputInlineQueryResultVenue¶
pytglib.api.types.input_inline_query_result_video module¶
-
class
pytglib.api.types.input_inline_query_result_video.InputInlineQueryResultVideo(id, title, description, thumbnail_url, video_url, mime_type, video_width, video_height, video_duration, reply_markup, input_message_content, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents a link to a page containing an embedded video player or a video file
- Attributes:
- ID (
str):InputInlineQueryResultVideo - Args:
- id (
str): - Unique identifier of the query result
- title (
str): - Title of the result
- description (
str): - A short description of the result, if known
- thumbnail_url (
str): - The URL of the video thumbnail (JPEG), if it exists
- video_url (
str): - URL of the embedded video player or video file
- mime_type (
str): - MIME type of the content of the video URL, only “text/html” or “video/mp4” are currently supported
- video_width (
int): - Width of the video
- video_height (
int): - Height of the video
- video_duration (
int): - Video duration, in seconds
- reply_markup (
telegram.api.types.ReplyMarkup): - The message reply markup; pass null if noneMust be of type replyMarkupInlineKeyboard or null
- input_message_content (
telegram.api.types.InputMessageContent): - The content of the message to be sentMust be one of the following types: inputMessageText, inputMessageVideo, inputMessageInvoice, inputMessageLocation, inputMessageVenue or inputMessageContact
- id (
- Returns:
- InputInlineQueryResult
- Raises:
telegram.Error
-
ID= 'inputInlineQueryResultVideo'¶
-
static
read(q: dict, *args) → pytglib.api.types.input_inline_query_result_video.InputInlineQueryResultVideo¶
pytglib.api.types.input_inline_query_result_voice_note module¶
-
class
pytglib.api.types.input_inline_query_result_voice_note.InputInlineQueryResultVoiceNote(id, title, voice_note_url, voice_note_duration, reply_markup, input_message_content, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents a link to an opus-encoded audio file within an OGG container, single channel audio
- Attributes:
- ID (
str):InputInlineQueryResultVoiceNote - Args:
- id (
str): - Unique identifier of the query result
- title (
str): - Title of the voice note
- voice_note_url (
str): - The URL of the voice note file
- voice_note_duration (
int): - Duration of the voice note, in seconds
- reply_markup (
telegram.api.types.ReplyMarkup): - The message reply markup; pass null if noneMust be of type replyMarkupInlineKeyboard or null
- input_message_content (
telegram.api.types.InputMessageContent): - The content of the message to be sentMust be one of the following types: inputMessageText, inputMessageVoiceNote, inputMessageInvoice, inputMessageLocation, inputMessageVenue or inputMessageContact
- id (
- Returns:
- InputInlineQueryResult
- Raises:
telegram.Error
-
ID= 'inputInlineQueryResultVoiceNote'¶
-
static
read(q: dict, *args) → pytglib.api.types.input_inline_query_result_voice_note.InputInlineQueryResultVoiceNote¶
pytglib.api.types.input_message_animation module¶
-
class
pytglib.api.types.input_message_animation.InputMessageAnimation(animation, thumbnail, added_sticker_file_ids, duration, width, height, caption, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectAn animation message (GIF-style).
- Attributes:
- ID (
str):InputMessageAnimation - Args:
- animation (
telegram.api.types.InputFile): - Animation file to be sent
- thumbnail (
telegram.api.types.inputThumbnail): - Animation thumbnail; pass null to skip thumbnail uploading
- added_sticker_file_ids (List of
int): - File identifiers of the stickers added to the animation, if applicable
- duration (
int): - Duration of the animation, in seconds
- width (
int): - Width of the animation; may be replaced by the server
- height (
int): - Height of the animation; may be replaced by the server
- caption (
telegram.api.types.formattedText): - Animation caption; pass null to use an empty caption; 0-GetOption(“message_caption_length_max”) characters
- animation (
- Returns:
- InputMessageContent
- Raises:
telegram.Error
-
ID= 'inputMessageAnimation'¶
-
static
read(q: dict, *args) → pytglib.api.types.input_message_animation.InputMessageAnimation¶
pytglib.api.types.input_message_audio module¶
-
class
pytglib.api.types.input_message_audio.InputMessageAudio(audio, album_cover_thumbnail, duration, title, performer, caption, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectAn audio message
- Attributes:
- ID (
str):InputMessageAudio - Args:
- audio (
telegram.api.types.InputFile): - Audio file to be sent
- album_cover_thumbnail (
telegram.api.types.inputThumbnail): - Thumbnail of the cover for the album; pass null to skip thumbnail uploading
- duration (
int): - Duration of the audio, in seconds; may be replaced by the server
- title (
str): - Title of the audio; 0-64 characters; may be replaced by the server
- performer (
str): - Performer of the audio; 0-64 characters, may be replaced by the server
- caption (
telegram.api.types.formattedText): - Audio caption; pass null to use an empty caption; 0-GetOption(“message_caption_length_max”) characters
- audio (
- Returns:
- InputMessageContent
- Raises:
telegram.Error
-
ID= 'inputMessageAudio'¶
-
static
read(q: dict, *args) → pytglib.api.types.input_message_audio.InputMessageAudio¶
pytglib.api.types.input_message_contact module¶
-
class
pytglib.api.types.input_message_contact.InputMessageContact(contact, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA message containing a user contact
- Attributes:
- ID (
str):InputMessageContact - Args:
- contact (
telegram.api.types.contact): - Contact to send
- contact (
- Returns:
- InputMessageContent
- Raises:
telegram.Error
-
ID= 'inputMessageContact'¶
-
static
read(q: dict, *args) → pytglib.api.types.input_message_contact.InputMessageContact¶
pytglib.api.types.input_message_content module¶
-
class
pytglib.api.types.input_message_content.InputMessageContent(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe content of a message to send
No parameters required.
-
ID= 'inputMessageContent'¶
-
static
read(q: dict, *args) → InputMessageContact or InputMessageSticker or InputMessageLocation or InputMessageText or InputMessageGame or InputMessageVideo or InputMessageVenue or InputMessageDocument or InputMessageDice or InputMessagePoll or InputMessageVoiceNote or InputMessageVideoNote or InputMessagePhoto or InputMessageAnimation or InputMessageForwarded or InputMessageAudio or InputMessageInvoice¶
-
pytglib.api.types.input_message_dice module¶
-
class
pytglib.api.types.input_message_dice.InputMessageDice(emoji, clear_draft, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA dice message
- Attributes:
- ID (
str):InputMessageDice - Args:
- emoji (
str): - Emoji on which the dice throw animation is based
- clear_draft (
bool): - True, if the chat message draft must be deleted
- emoji (
- Returns:
- InputMessageContent
- Raises:
telegram.Error
-
ID= 'inputMessageDice'¶
-
static
read(q: dict, *args) → pytglib.api.types.input_message_dice.InputMessageDice¶
pytglib.api.types.input_message_document module¶
-
class
pytglib.api.types.input_message_document.InputMessageDocument(document, thumbnail, disable_content_type_detection, caption, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA document message (general file)
- Attributes:
- ID (
str):InputMessageDocument - Args:
- document (
telegram.api.types.InputFile): - Document to be sent
- thumbnail (
telegram.api.types.inputThumbnail): - Document thumbnail; pass null to skip thumbnail uploading
- disable_content_type_detection (
bool): - If true, automatic file type detection will be disabled and the document will be always sent as fileAlways true for files sent to secret chats
- caption (
telegram.api.types.formattedText): - Document caption; pass null to use an empty caption; 0-GetOption(“message_caption_length_max”) characters
- document (
- Returns:
- InputMessageContent
- Raises:
telegram.Error
-
ID= 'inputMessageDocument'¶
-
static
read(q: dict, *args) → pytglib.api.types.input_message_document.InputMessageDocument¶
pytglib.api.types.input_message_forwarded module¶
-
class
pytglib.api.types.input_message_forwarded.InputMessageForwarded(from_chat_id, message_id, in_game_share, copy_options, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA forwarded message
- Attributes:
- ID (
str):InputMessageForwarded - Args:
- from_chat_id (
int): - Identifier for the chat this forwarded message came from
- message_id (
int): - Identifier of the message to forward
- in_game_share (
bool): - True, if a game message is being shared from a launched game; applies only to game messages
- copy_options (
telegram.api.types.messageCopyOptions): - Options to be used to copy content of the message without reference to the original sender; pass null to forward the message as usual
- from_chat_id (
- Returns:
- InputMessageContent
- Raises:
telegram.Error
-
ID= 'inputMessageForwarded'¶
-
static
read(q: dict, *args) → pytglib.api.types.input_message_forwarded.InputMessageForwarded¶
pytglib.api.types.input_message_game module¶
-
class
pytglib.api.types.input_message_game.InputMessageGame(bot_user_id, game_short_name, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA message with a game; not supported for channels or secret chats
- Attributes:
- ID (
str):InputMessageGame - Args:
- bot_user_id (
int): - User identifier of the bot that owns the game
- game_short_name (
str): - Short name of the game
- bot_user_id (
- Returns:
- InputMessageContent
- Raises:
telegram.Error
-
ID= 'inputMessageGame'¶
-
static
read(q: dict, *args) → pytglib.api.types.input_message_game.InputMessageGame¶
pytglib.api.types.input_message_invoice module¶
-
class
pytglib.api.types.input_message_invoice.InputMessageInvoice(invoice, title, description, photo_url, photo_size, photo_width, photo_height, payload, provider_token, provider_data, start_parameter, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA message with an invoice; can be used only by bots
- Attributes:
- ID (
str):InputMessageInvoice - Args:
- invoice (
telegram.api.types.invoice): - Invoice
- title (
str): - Product title; 1-32 characters
- description (
str): - Product description; 0-255 characters
- photo_url (
str): - Product photo URL; optional
- photo_size (
int): - Product photo size
- photo_width (
int): - Product photo width
- photo_height (
int): - Product photo height
- payload (
bytes): - The invoice payload
- provider_token (
str): - Payment provider token
- provider_data (
str): - JSON-encoded data about the invoice, which will be shared with the payment provider
- start_parameter (
str): - Unique invoice bot deep link parameter for the generation of this invoiceIf empty, it would be possible to pay directly from forwards of the invoice message
- invoice (
- Returns:
- InputMessageContent
- Raises:
telegram.Error
-
ID= 'inputMessageInvoice'¶
-
static
read(q: dict, *args) → pytglib.api.types.input_message_invoice.InputMessageInvoice¶
pytglib.api.types.input_message_location module¶
-
class
pytglib.api.types.input_message_location.InputMessageLocation(location, live_period, heading, proximity_alert_radius, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA message with a location
- Attributes:
- ID (
str):InputMessageLocation - Args:
- location (
telegram.api.types.location): - Location to be sent
- live_period (
int): - Period for which the location can be updated, in seconds; must be between 60 and 86400 for a live location and 0 otherwise
- heading (
int): - For live locations, a direction in which the location moves, in degrees; 1-360Pass 0 if unknown
- proximity_alert_radius (
int): - For live locations, a maximum distance to another chat member for proximity alerts, in meters (0-100000)Pass 0 if the notification is disabledCan’t be enabled in channels and Saved Messages
- location (
- Returns:
- InputMessageContent
- Raises:
telegram.Error
-
ID= 'inputMessageLocation'¶
-
static
read(q: dict, *args) → pytglib.api.types.input_message_location.InputMessageLocation¶
pytglib.api.types.input_message_photo module¶
-
class
pytglib.api.types.input_message_photo.InputMessagePhoto(photo, thumbnail, added_sticker_file_ids, width, height, caption, ttl, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA photo message
- Attributes:
- ID (
str):InputMessagePhoto - Args:
- photo (
telegram.api.types.InputFile): - Photo to sendThe photo must be at most 10 MB in sizeThe photo’s width and height must not exceed 10000 in totalWidth and height ratio must be at most 20
- thumbnail (
telegram.api.types.inputThumbnail): - Photo thumbnail to be sent; pass null to skip thumbnail uploadingThe thumbnail is sent to the other party only in secret chats
- added_sticker_file_ids (List of
int): - File identifiers of the stickers added to the photo, if applicable
- width (
int): - Photo width
- height (
int): - Photo height
- caption (
telegram.api.types.formattedText): - Photo caption; pass null to use an empty caption; 0-GetOption(“message_caption_length_max”) characters
- ttl (
int): - Photo TTL (Time To Live), in seconds (0-60)A non-zero TTL can be specified only in private chats
- photo (
- Returns:
- InputMessageContent
- Raises:
telegram.Error
-
ID= 'inputMessagePhoto'¶
-
static
read(q: dict, *args) → pytglib.api.types.input_message_photo.InputMessagePhoto¶
pytglib.api.types.input_message_poll module¶
-
class
pytglib.api.types.input_message_poll.InputMessagePoll(question, options, is_anonymous, type, open_period, close_date, is_closed, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA message with a poll. Polls can’t be sent to secret chats. Polls can be sent only to a private chat with a bot
- Attributes:
- ID (
str):InputMessagePoll - Args:
- question (
str): - Poll question; 1-255 characters (up to 300 characters for bots)
- options (List of
str): - List of poll answer options, 2-10 strings 1-100 characters each
- is_anonymous (
bool): - True, if the poll voters are anonymousNon-anonymous polls can’t be sent or forwarded to channels
- type (
telegram.api.types.PollType): - Type of the poll
- open_period (
int): - Amount of time the poll will be active after creation, in seconds; for bots only
- close_date (
int): - Point in time (Unix timestamp) when the poll will automatically be closed; for bots only
- is_closed (
bool): - True, if the poll needs to be sent already closed; for bots only
- question (
- Returns:
- InputMessageContent
- Raises:
telegram.Error
-
ID= 'inputMessagePoll'¶
-
static
read(q: dict, *args) → pytglib.api.types.input_message_poll.InputMessagePoll¶
pytglib.api.types.input_message_sticker module¶
-
class
pytglib.api.types.input_message_sticker.InputMessageSticker(sticker, thumbnail, width, height, emoji, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA sticker message
- Attributes:
- ID (
str):InputMessageSticker - Args:
- sticker (
telegram.api.types.InputFile): - Sticker to be sent
- thumbnail (
telegram.api.types.inputThumbnail): - Sticker thumbnail; pass null to skip thumbnail uploading
- width (
int): - Sticker width
- height (
int): - Sticker height
- emoji (
str): - Emoji used to choose the sticker
- sticker (
- Returns:
- InputMessageContent
- Raises:
telegram.Error
-
ID= 'inputMessageSticker'¶
-
static
read(q: dict, *args) → pytglib.api.types.input_message_sticker.InputMessageSticker¶
pytglib.api.types.input_message_text module¶
-
class
pytglib.api.types.input_message_text.InputMessageText(text, disable_web_page_preview, clear_draft, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA text message
- Attributes:
- ID (
str):InputMessageText - Args:
- text (
telegram.api.types.formattedText): - Formatted text to be sent; 1-GetOption(“message_text_length_max”) charactersOnly Bold, Italic, Underline, Strikethrough, Spoiler, Code, Pre, PreCode, TextUrl and MentionName entities are allowed to be specified manually
- disable_web_page_preview (
bool): - True, if rich web page previews for URLs in the message text must be disabled
- clear_draft (
bool): - True, if a chat message draft must be deleted
- text (
- Returns:
- InputMessageContent
- Raises:
telegram.Error
-
ID= 'inputMessageText'¶
-
static
read(q: dict, *args) → pytglib.api.types.input_message_text.InputMessageText¶
pytglib.api.types.input_message_venue module¶
-
class
pytglib.api.types.input_message_venue.InputMessageVenue(venue, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA message with information about a venue
- Attributes:
- ID (
str):InputMessageVenue - Args:
- venue (
telegram.api.types.venue): - Venue to send
- venue (
- Returns:
- InputMessageContent
- Raises:
telegram.Error
-
ID= 'inputMessageVenue'¶
-
static
read(q: dict, *args) → pytglib.api.types.input_message_venue.InputMessageVenue¶
pytglib.api.types.input_message_video module¶
-
class
pytglib.api.types.input_message_video.InputMessageVideo(video, thumbnail, added_sticker_file_ids, duration, width, height, supports_streaming, caption, ttl, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA video message
- Attributes:
- ID (
str):InputMessageVideo - Args:
- video (
telegram.api.types.InputFile): - Video to be sent
- thumbnail (
telegram.api.types.inputThumbnail): - Video thumbnail; pass null to skip thumbnail uploading
- added_sticker_file_ids (List of
int): - File identifiers of the stickers added to the video, if applicable
- duration (
int): - Duration of the video, in seconds
- width (
int): - Video width
- height (
int): - Video height
- supports_streaming (
bool): - True, if the video is supposed to be streamed
- caption (
telegram.api.types.formattedText): - Video caption; pass null to use an empty caption; 0-GetOption(“message_caption_length_max”) characters
- ttl (
int): - Video TTL (Time To Live), in seconds (0-60)A non-zero TTL can be specified only in private chats
- video (
- Returns:
- InputMessageContent
- Raises:
telegram.Error
-
ID= 'inputMessageVideo'¶
-
static
read(q: dict, *args) → pytglib.api.types.input_message_video.InputMessageVideo¶
pytglib.api.types.input_message_video_note module¶
-
class
pytglib.api.types.input_message_video_note.InputMessageVideoNote(video_note, thumbnail, duration, length, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA video note message
- Attributes:
- ID (
str):InputMessageVideoNote - Args:
- video_note (
telegram.api.types.InputFile): - Video note to be sent
- thumbnail (
telegram.api.types.inputThumbnail): - Video thumbnail; pass null to skip thumbnail uploading
- duration (
int): - Duration of the video, in seconds
- length (
int): - Video width and height; must be positive and not greater than 640
- video_note (
- Returns:
- InputMessageContent
- Raises:
telegram.Error
-
ID= 'inputMessageVideoNote'¶
-
static
read(q: dict, *args) → pytglib.api.types.input_message_video_note.InputMessageVideoNote¶
pytglib.api.types.input_message_voice_note module¶
-
class
pytglib.api.types.input_message_voice_note.InputMessageVoiceNote(voice_note, duration, waveform, caption, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA voice note message
- Attributes:
- ID (
str):InputMessageVoiceNote - Args:
- voice_note (
telegram.api.types.InputFile): - Voice note to be sent
- duration (
int): - Duration of the voice note, in seconds
- waveform (
bytes): - Waveform representation of the voice note, in 5-bit format
- caption (
telegram.api.types.formattedText): - Voice note caption; pass null to use an empty caption; 0-GetOption(“message_caption_length_max”) characters
- voice_note (
- Returns:
- InputMessageContent
- Raises:
telegram.Error
-
ID= 'inputMessageVoiceNote'¶
-
static
read(q: dict, *args) → pytglib.api.types.input_message_voice_note.InputMessageVoiceNote¶
pytglib.api.types.input_passport_element module¶
-
class
pytglib.api.types.input_passport_element.InputPassportElement(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains information about a Telegram Passport element to be saved
No parameters required.
-
ID= 'inputPassportElement'¶
-
static
read(q: dict, *args) → InputPassportElementPersonalDetails or InputPassportElementAddress or InputPassportElementBankStatement or InputPassportElementPassportRegistration or InputPassportElementIdentityCard or InputPassportElementUtilityBill or InputPassportElementPhoneNumber or InputPassportElementEmailAddress or InputPassportElementPassport or InputPassportElementInternalPassport or InputPassportElementTemporaryRegistration or InputPassportElementDriverLicense or InputPassportElementRentalAgreement¶
-
pytglib.api.types.input_passport_element_address module¶
-
class
pytglib.api.types.input_passport_element_address.InputPassportElementAddress(address, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA Telegram Passport element to be saved containing the user’s address
- Attributes:
- ID (
str):InputPassportElementAddress - Args:
- address (
telegram.api.types.address): - The address to be saved
- address (
- Returns:
- InputPassportElement
- Raises:
telegram.Error
-
ID= 'inputPassportElementAddress'¶
-
static
read(q: dict, *args) → pytglib.api.types.input_passport_element_address.InputPassportElementAddress¶
pytglib.api.types.input_passport_element_bank_statement module¶
-
class
pytglib.api.types.input_passport_element_bank_statement.InputPassportElementBankStatement(bank_statement, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA Telegram Passport element to be saved containing the user’s bank statement
- Attributes:
- ID (
str):InputPassportElementBankStatement - Args:
- bank_statement (
telegram.api.types.inputPersonalDocument): - The bank statement to be saved
- bank_statement (
- Returns:
- InputPassportElement
- Raises:
telegram.Error
-
ID= 'inputPassportElementBankStatement'¶
-
static
read(q: dict, *args) → pytglib.api.types.input_passport_element_bank_statement.InputPassportElementBankStatement¶
pytglib.api.types.input_passport_element_driver_license module¶
-
class
pytglib.api.types.input_passport_element_driver_license.InputPassportElementDriverLicense(driver_license, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA Telegram Passport element to be saved containing the user’s driver license
- Attributes:
- ID (
str):InputPassportElementDriverLicense - Args:
- driver_license (
telegram.api.types.inputIdentityDocument): - The driver license to be saved
- driver_license (
- Returns:
- InputPassportElement
- Raises:
telegram.Error
-
ID= 'inputPassportElementDriverLicense'¶
-
static
read(q: dict, *args) → pytglib.api.types.input_passport_element_driver_license.InputPassportElementDriverLicense¶
pytglib.api.types.input_passport_element_email_address module¶
-
class
pytglib.api.types.input_passport_element_email_address.InputPassportElementEmailAddress(email_address, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA Telegram Passport element to be saved containing the user’s email address
- Attributes:
- ID (
str):InputPassportElementEmailAddress - Args:
- email_address (
str): - The email address to be saved
- email_address (
- Returns:
- InputPassportElement
- Raises:
telegram.Error
-
ID= 'inputPassportElementEmailAddress'¶
-
static
read(q: dict, *args) → pytglib.api.types.input_passport_element_email_address.InputPassportElementEmailAddress¶
pytglib.api.types.input_passport_element_error module¶
-
class
pytglib.api.types.input_passport_element_error.InputPassportElementError(type, message, source, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains the description of an error in a Telegram Passport element; for bots only
- Attributes:
- ID (
str):InputPassportElementError - Args:
- type (
telegram.api.types.PassportElementType): - Type of Telegram Passport element that has the error
- message (
str): - Error message
- source (
telegram.api.types.InputPassportElementErrorSource): - Error source
- type (
- Returns:
- InputPassportElementError
- Raises:
telegram.Error
-
ID= 'inputPassportElementError'¶
-
static
read(q: dict, *args) → pytglib.api.types.input_passport_element_error.InputPassportElementError¶
pytglib.api.types.input_passport_element_error_source module¶
-
class
pytglib.api.types.input_passport_element_error_source.InputPassportElementErrorSource(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains the description of an error in a Telegram Passport element; for bots only
No parameters required.
-
ID= 'inputPassportElementErrorSource'¶
-
static
read(q: dict, *args) → InputPassportElementErrorSourceFile or InputPassportElementErrorSourceTranslationFile or InputPassportElementErrorSourceReverseSide or InputPassportElementErrorSourceUnspecified or InputPassportElementErrorSourceDataField or InputPassportElementErrorSourceTranslationFiles or InputPassportElementErrorSourceFrontSide or InputPassportElementErrorSourceFiles or InputPassportElementErrorSourceSelfie¶
-
pytglib.api.types.input_passport_element_error_source_data_field module¶
-
class
pytglib.api.types.input_passport_element_error_source_data_field.InputPassportElementErrorSourceDataField(field_name, data_hash, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA data field contains an error. The error is considered resolved when the field’s value changes
- Attributes:
- ID (
str):InputPassportElementErrorSourceDataField - Args:
- field_name (
str): - Field name
- data_hash (
bytes): - Current data hash
- field_name (
- Returns:
- InputPassportElementErrorSource
- Raises:
telegram.Error
-
ID= 'inputPassportElementErrorSourceDataField'¶
-
static
read(q: dict, *args) → pytglib.api.types.input_passport_element_error_source_data_field.InputPassportElementErrorSourceDataField¶
pytglib.api.types.input_passport_element_error_source_file module¶
-
class
pytglib.api.types.input_passport_element_error_source_file.InputPassportElementErrorSourceFile(file_hash, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe file contains an error. The error is considered resolved when the file changes
- Attributes:
- ID (
str):InputPassportElementErrorSourceFile - Args:
- file_hash (
bytes): - Current hash of the file which has the error
- file_hash (
- Returns:
- InputPassportElementErrorSource
- Raises:
telegram.Error
-
ID= 'inputPassportElementErrorSourceFile'¶
-
static
read(q: dict, *args) → pytglib.api.types.input_passport_element_error_source_file.InputPassportElementErrorSourceFile¶
pytglib.api.types.input_passport_element_error_source_files module¶
-
class
pytglib.api.types.input_passport_element_error_source_files.InputPassportElementErrorSourceFiles(file_hashes, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe list of attached files contains an error. The error is considered resolved when the file list changes
- Attributes:
- ID (
str):InputPassportElementErrorSourceFiles - Args:
- file_hashes (List of
bytes): - Current hashes of all attached files
- file_hashes (List of
- Returns:
- InputPassportElementErrorSource
- Raises:
telegram.Error
-
ID= 'inputPassportElementErrorSourceFiles'¶
-
static
read(q: dict, *args) → pytglib.api.types.input_passport_element_error_source_files.InputPassportElementErrorSourceFiles¶
pytglib.api.types.input_passport_element_error_source_front_side module¶
-
class
pytglib.api.types.input_passport_element_error_source_front_side.InputPassportElementErrorSourceFrontSide(file_hash, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe front side of the document contains an error. The error is considered resolved when the file with the front side of the document changes
- Attributes:
- ID (
str):InputPassportElementErrorSourceFrontSide - Args:
- file_hash (
bytes): - Current hash of the file containing the front side
- file_hash (
- Returns:
- InputPassportElementErrorSource
- Raises:
telegram.Error
-
ID= 'inputPassportElementErrorSourceFrontSide'¶
-
static
read(q: dict, *args) → pytglib.api.types.input_passport_element_error_source_front_side.InputPassportElementErrorSourceFrontSide¶
pytglib.api.types.input_passport_element_error_source_reverse_side module¶
-
class
pytglib.api.types.input_passport_element_error_source_reverse_side.InputPassportElementErrorSourceReverseSide(file_hash, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe reverse side of the document contains an error. The error is considered resolved when the file with the reverse side of the document changes
- Attributes:
- ID (
str):InputPassportElementErrorSourceReverseSide - Args:
- file_hash (
bytes): - Current hash of the file containing the reverse side
- file_hash (
- Returns:
- InputPassportElementErrorSource
- Raises:
telegram.Error
-
ID= 'inputPassportElementErrorSourceReverseSide'¶
-
static
read(q: dict, *args) → pytglib.api.types.input_passport_element_error_source_reverse_side.InputPassportElementErrorSourceReverseSide¶
pytglib.api.types.input_passport_element_error_source_selfie module¶
-
class
pytglib.api.types.input_passport_element_error_source_selfie.InputPassportElementErrorSourceSelfie(file_hash, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe selfie contains an error. The error is considered resolved when the file with the selfie changes
- Attributes:
- ID (
str):InputPassportElementErrorSourceSelfie - Args:
- file_hash (
bytes): - Current hash of the file containing the selfie
- file_hash (
- Returns:
- InputPassportElementErrorSource
- Raises:
telegram.Error
-
ID= 'inputPassportElementErrorSourceSelfie'¶
-
static
read(q: dict, *args) → pytglib.api.types.input_passport_element_error_source_selfie.InputPassportElementErrorSourceSelfie¶
pytglib.api.types.input_passport_element_error_source_translation_file module¶
-
class
pytglib.api.types.input_passport_element_error_source_translation_file.InputPassportElementErrorSourceTranslationFile(file_hash, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectOne of the files containing the translation of the document contains an error. The error is considered resolved when the file with the translation changes
- Attributes:
- ID (
str):InputPassportElementErrorSourceTranslationFile - Args:
- file_hash (
bytes): - Current hash of the file containing the translation
- file_hash (
- Returns:
- InputPassportElementErrorSource
- Raises:
telegram.Error
-
ID= 'inputPassportElementErrorSourceTranslationFile'¶
-
static
read(q: dict, *args) → pytglib.api.types.input_passport_element_error_source_translation_file.InputPassportElementErrorSourceTranslationFile¶
pytglib.api.types.input_passport_element_error_source_translation_files module¶
-
class
pytglib.api.types.input_passport_element_error_source_translation_files.InputPassportElementErrorSourceTranslationFiles(file_hashes, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe translation of the document contains an error. The error is considered resolved when the list of files changes
- Attributes:
- ID (
str):InputPassportElementErrorSourceTranslationFiles - Args:
- file_hashes (List of
bytes): - Current hashes of all files with the translation
- file_hashes (List of
- Returns:
- InputPassportElementErrorSource
- Raises:
telegram.Error
-
ID= 'inputPassportElementErrorSourceTranslationFiles'¶
-
static
read(q: dict, *args) → pytglib.api.types.input_passport_element_error_source_translation_files.InputPassportElementErrorSourceTranslationFiles¶
pytglib.api.types.input_passport_element_error_source_unspecified module¶
-
class
pytglib.api.types.input_passport_element_error_source_unspecified.InputPassportElementErrorSourceUnspecified(element_hash, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe element contains an error in an unspecified place. The error will be considered resolved when new data is added
- Attributes:
- ID (
str):InputPassportElementErrorSourceUnspecified - Args:
- element_hash (
bytes): - Current hash of the entire element
- element_hash (
- Returns:
- InputPassportElementErrorSource
- Raises:
telegram.Error
-
ID= 'inputPassportElementErrorSourceUnspecified'¶
-
static
read(q: dict, *args) → pytglib.api.types.input_passport_element_error_source_unspecified.InputPassportElementErrorSourceUnspecified¶
pytglib.api.types.input_passport_element_identity_card module¶
-
class
pytglib.api.types.input_passport_element_identity_card.InputPassportElementIdentityCard(identity_card, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA Telegram Passport element to be saved containing the user’s identity card
- Attributes:
- ID (
str):InputPassportElementIdentityCard - Args:
- identity_card (
telegram.api.types.inputIdentityDocument): - The identity card to be saved
- identity_card (
- Returns:
- InputPassportElement
- Raises:
telegram.Error
-
ID= 'inputPassportElementIdentityCard'¶
-
static
read(q: dict, *args) → pytglib.api.types.input_passport_element_identity_card.InputPassportElementIdentityCard¶
pytglib.api.types.input_passport_element_internal_passport module¶
-
class
pytglib.api.types.input_passport_element_internal_passport.InputPassportElementInternalPassport(internal_passport, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA Telegram Passport element to be saved containing the user’s internal passport
- Attributes:
- ID (
str):InputPassportElementInternalPassport - Args:
- internal_passport (
telegram.api.types.inputIdentityDocument): - The internal passport to be saved
- internal_passport (
- Returns:
- InputPassportElement
- Raises:
telegram.Error
-
ID= 'inputPassportElementInternalPassport'¶
-
static
read(q: dict, *args) → pytglib.api.types.input_passport_element_internal_passport.InputPassportElementInternalPassport¶
pytglib.api.types.input_passport_element_passport module¶
-
class
pytglib.api.types.input_passport_element_passport.InputPassportElementPassport(passport, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA Telegram Passport element to be saved containing the user’s passport
- Attributes:
- ID (
str):InputPassportElementPassport - Args:
- passport (
telegram.api.types.inputIdentityDocument): - The passport to be saved
- passport (
- Returns:
- InputPassportElement
- Raises:
telegram.Error
-
ID= 'inputPassportElementPassport'¶
-
static
read(q: dict, *args) → pytglib.api.types.input_passport_element_passport.InputPassportElementPassport¶
pytglib.api.types.input_passport_element_passport_registration module¶
-
class
pytglib.api.types.input_passport_element_passport_registration.InputPassportElementPassportRegistration(passport_registration, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA Telegram Passport element to be saved containing the user’s passport registration
- Attributes:
- ID (
str):InputPassportElementPassportRegistration - Args:
- passport_registration (
telegram.api.types.inputPersonalDocument): - The passport registration page to be saved
- passport_registration (
- Returns:
- InputPassportElement
- Raises:
telegram.Error
-
ID= 'inputPassportElementPassportRegistration'¶
-
static
read(q: dict, *args) → pytglib.api.types.input_passport_element_passport_registration.InputPassportElementPassportRegistration¶
pytglib.api.types.input_passport_element_personal_details module¶
-
class
pytglib.api.types.input_passport_element_personal_details.InputPassportElementPersonalDetails(personal_details, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA Telegram Passport element to be saved containing the user’s personal details
- Attributes:
- ID (
str):InputPassportElementPersonalDetails - Args:
- personal_details (
telegram.api.types.personalDetails): - Personal details of the user
- personal_details (
- Returns:
- InputPassportElement
- Raises:
telegram.Error
-
ID= 'inputPassportElementPersonalDetails'¶
-
static
read(q: dict, *args) → pytglib.api.types.input_passport_element_personal_details.InputPassportElementPersonalDetails¶
pytglib.api.types.input_passport_element_phone_number module¶
-
class
pytglib.api.types.input_passport_element_phone_number.InputPassportElementPhoneNumber(phone_number, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA Telegram Passport element to be saved containing the user’s phone number
- Attributes:
- ID (
str):InputPassportElementPhoneNumber - Args:
- phone_number (
str): - The phone number to be saved
- phone_number (
- Returns:
- InputPassportElement
- Raises:
telegram.Error
-
ID= 'inputPassportElementPhoneNumber'¶
-
static
read(q: dict, *args) → pytglib.api.types.input_passport_element_phone_number.InputPassportElementPhoneNumber¶
pytglib.api.types.input_passport_element_rental_agreement module¶
-
class
pytglib.api.types.input_passport_element_rental_agreement.InputPassportElementRentalAgreement(rental_agreement, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA Telegram Passport element to be saved containing the user’s rental agreement
- Attributes:
- ID (
str):InputPassportElementRentalAgreement - Args:
- rental_agreement (
telegram.api.types.inputPersonalDocument): - The rental agreement to be saved
- rental_agreement (
- Returns:
- InputPassportElement
- Raises:
telegram.Error
-
ID= 'inputPassportElementRentalAgreement'¶
-
static
read(q: dict, *args) → pytglib.api.types.input_passport_element_rental_agreement.InputPassportElementRentalAgreement¶
pytglib.api.types.input_passport_element_temporary_registration module¶
-
class
pytglib.api.types.input_passport_element_temporary_registration.InputPassportElementTemporaryRegistration(temporary_registration, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA Telegram Passport element to be saved containing the user’s temporary registration
- Attributes:
- ID (
str):InputPassportElementTemporaryRegistration - Args:
- temporary_registration (
telegram.api.types.inputPersonalDocument): - The temporary registration document to be saved
- temporary_registration (
- Returns:
- InputPassportElement
- Raises:
telegram.Error
-
ID= 'inputPassportElementTemporaryRegistration'¶
-
static
read(q: dict, *args) → pytglib.api.types.input_passport_element_temporary_registration.InputPassportElementTemporaryRegistration¶
pytglib.api.types.input_passport_element_utility_bill module¶
-
class
pytglib.api.types.input_passport_element_utility_bill.InputPassportElementUtilityBill(utility_bill, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA Telegram Passport element to be saved containing the user’s utility bill
- Attributes:
- ID (
str):InputPassportElementUtilityBill - Args:
- utility_bill (
telegram.api.types.inputPersonalDocument): - The utility bill to be saved
- utility_bill (
- Returns:
- InputPassportElement
- Raises:
telegram.Error
-
ID= 'inputPassportElementUtilityBill'¶
-
static
read(q: dict, *args) → pytglib.api.types.input_passport_element_utility_bill.InputPassportElementUtilityBill¶
pytglib.api.types.input_personal_document module¶
-
class
pytglib.api.types.input_personal_document.InputPersonalDocument(files, translation, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA personal document to be saved to Telegram Passport
- Attributes:
- ID (
str):InputPersonalDocument - Args:
- files (List of
telegram.api.types.InputFile): - List of files containing the pages of the document
- translation (List of
telegram.api.types.InputFile): - List of files containing a certified English translation of the document
- files (List of
- Returns:
- InputPersonalDocument
- Raises:
telegram.Error
-
ID= 'inputPersonalDocument'¶
-
static
read(q: dict, *args) → pytglib.api.types.input_personal_document.InputPersonalDocument¶
pytglib.api.types.input_sticker module¶
-
class
pytglib.api.types.input_sticker.InputSticker(sticker, emojis, type, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA sticker to be added to a sticker set
- Attributes:
- ID (
str):InputSticker - Args:
- sticker (
telegram.api.types.InputFile): - File with the sticker; must fit in a 512x512 squareFor WEBP stickers and masks the file must be in PNG format, which will be converted to WEBP server-sideOtherwise, the file must be local or uploaded within a weekSee https://coretelegramorg/animated_stickers#technical-requirements for technical requirements
- emojis (
str): - Emojis corresponding to the sticker
- type (
telegram.api.types.StickerType): - Sticker type
- sticker (
- Returns:
- InputSticker
- Raises:
telegram.Error
-
ID= 'inputSticker'¶
-
static
read(q: dict, *args) → pytglib.api.types.input_sticker.InputSticker¶
pytglib.api.types.input_sticker_animated module¶
pytglib.api.types.input_sticker_static module¶
pytglib.api.types.input_thumbnail module¶
-
class
pytglib.api.types.input_thumbnail.InputThumbnail(thumbnail, width, height, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA thumbnail to be sent along with a file; must be in JPEG or WEBP format for stickers, and less than 200 KB in size
- Attributes:
- ID (
str):InputThumbnail - Args:
- thumbnail (
telegram.api.types.InputFile): - Thumbnail file to sendSending thumbnails by file_id is currently not supported
- width (
int): - Thumbnail width, usually shouldn’t exceed 320Use 0 if unknown
- height (
int): - Thumbnail height, usually shouldn’t exceed 320Use 0 if unknown
- thumbnail (
- Returns:
- InputThumbnail
- Raises:
telegram.Error
-
ID= 'inputThumbnail'¶
-
static
read(q: dict, *args) → pytglib.api.types.input_thumbnail.InputThumbnail¶
pytglib.api.types.invoice module¶
-
class
pytglib.api.types.invoice.Invoice(currency, price_parts, max_tip_amount, suggested_tip_amounts, recurring_payment_terms_of_service_url, is_test, need_name, need_phone_number, need_email_address, need_shipping_address, send_phone_number_to_provider, send_email_address_to_provider, is_flexible, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectProduct invoice
- Attributes:
- ID (
str):Invoice - Args:
- currency (
str): - ISO 4217 currency code
- price_parts (List of
telegram.api.types.labeledPricePart): - A list of objects used to calculate the total price of the product
- max_tip_amount (
int): - The maximum allowed amount of tip in the smallest units of the currency
- suggested_tip_amounts (List of
int): - Suggested amounts of tip in the smallest units of the currency
- recurring_payment_terms_of_service_url (
str): - An HTTP URL with terms of service for recurring paymentsIf non-empty, the invoice payment will result in recurring payments and the user must accept the terms of service before allowed to pay
- is_test (
bool): - True, if the payment is a test payment
- need_name (
bool): - True, if the user’s name is needed for payment
- need_phone_number (
bool): - True, if the user’s phone number is needed for payment
- need_email_address (
bool): - True, if the user’s email address is needed for payment
- need_shipping_address (
bool): - True, if the user’s shipping address is needed for payment
- send_phone_number_to_provider (
bool): - True, if the user’s phone number will be sent to the provider
- send_email_address_to_provider (
bool): - True, if the user’s email address will be sent to the provider
- is_flexible (
bool): - True, if the total price depends on the shipping method
- currency (
- Returns:
- Invoice
- Raises:
telegram.Error
-
ID= 'invoice'¶
-
static
read(q: dict, *args) → pytglib.api.types.invoice.Invoice¶
pytglib.api.types.json_object_member module¶
-
class
pytglib.api.types.json_object_member.JsonObjectMember(key, value, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents one member of a JSON object
- Attributes:
- ID (
str):JsonObjectMember - Args:
- key (
str): - Member’s key
- value (
telegram.api.types.JsonValue): - Member’s value
- key (
- Returns:
- JsonObjectMember
- Raises:
telegram.Error
-
ID= 'jsonObjectMember'¶
-
static
read(q: dict, *args) → pytglib.api.types.json_object_member.JsonObjectMember¶
pytglib.api.types.json_value module¶
-
class
pytglib.api.types.json_value.JsonValue(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents a JSON value
No parameters required.
-
ID= 'jsonValue'¶
-
static
read(q: dict, *args) → JsonValueString or JsonValueNull or JsonValueObject or JsonValueArray or JsonValueBoolean or JsonValueNumber¶
-
pytglib.api.types.json_value_array module¶
-
class
pytglib.api.types.json_value_array.JsonValueArray(values, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents a JSON array
- Attributes:
- ID (
str):JsonValueArray - Args:
- values (List of
telegram.api.types.JsonValue): - The list of array elements
- values (List of
- Returns:
- JsonValue
- Raises:
telegram.Error
-
ID= 'jsonValueArray'¶
-
static
read(q: dict, *args) → pytglib.api.types.json_value_array.JsonValueArray¶
pytglib.api.types.json_value_boolean module¶
-
class
pytglib.api.types.json_value_boolean.JsonValueBoolean(value, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents a boolean JSON value
- Attributes:
- ID (
str):JsonValueBoolean - Args:
- value (
bool): - The value
- value (
- Returns:
- JsonValue
- Raises:
telegram.Error
-
ID= 'jsonValueBoolean'¶
-
static
read(q: dict, *args) → pytglib.api.types.json_value_boolean.JsonValueBoolean¶
pytglib.api.types.json_value_null module¶
-
class
pytglib.api.types.json_value_null.JsonValueNull(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents a null JSON value
- Attributes:
- ID (
str):JsonValueNull
No parameters required.
- Returns:
- JsonValue
- Raises:
telegram.Error
-
ID= 'jsonValueNull'¶
-
static
read(q: dict, *args) → pytglib.api.types.json_value_null.JsonValueNull¶
pytglib.api.types.json_value_number module¶
-
class
pytglib.api.types.json_value_number.JsonValueNumber(value, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents a numeric JSON value
- Attributes:
- ID (
str):JsonValueNumber - Args:
- value (
float): - The value
- value (
- Returns:
- JsonValue
- Raises:
telegram.Error
-
ID= 'jsonValueNumber'¶
-
static
read(q: dict, *args) → pytglib.api.types.json_value_number.JsonValueNumber¶
pytglib.api.types.json_value_object module¶
-
class
pytglib.api.types.json_value_object.JsonValueObject(members, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents a JSON object
- Attributes:
- ID (
str):JsonValueObject - Args:
- members (List of
telegram.api.types.jsonObjectMember): - The list of object members
- members (List of
- Returns:
- JsonValue
- Raises:
telegram.Error
-
ID= 'jsonValueObject'¶
-
static
read(q: dict, *args) → pytglib.api.types.json_value_object.JsonValueObject¶
pytglib.api.types.json_value_string module¶
-
class
pytglib.api.types.json_value_string.JsonValueString(value, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents a string JSON value
- Attributes:
- ID (
str):JsonValueString - Args:
- value (
str): - The value
- value (
- Returns:
- JsonValue
- Raises:
telegram.Error
-
ID= 'jsonValueString'¶
-
static
read(q: dict, *args) → pytglib.api.types.json_value_string.JsonValueString¶
pytglib.api.types.keyboard_button module¶
Bases:
pytglib.api.utils.object.ObjectRepresents a single button in a bot keyboard
- Attributes:
- ID (
str):KeyboardButton - Args:
- text (
str): - Text of the button
- type (
telegram.api.types.KeyboardButtonType): - Type of the button
- text (
- Returns:
- KeyboardButton
- Raises:
telegram.Error
pytglib.api.types.keyboard_button_type module¶
Bases:
pytglib.api.utils.object.ObjectDescribes a keyboard button type
No parameters required.
pytglib.api.types.keyboard_button_type_request_location module¶
Bases:
pytglib.api.utils.object.ObjectA button that sends the user’s location when pressed; available only in private chats
- Attributes:
- ID (
str):KeyboardButtonTypeRequestLocation
No parameters required.
- Returns:
- KeyboardButtonType
- Raises:
telegram.Error
pytglib.api.types.keyboard_button_type_request_phone_number module¶
Bases:
pytglib.api.utils.object.ObjectA button that sends the user’s phone number when pressed; available only in private chats
- Attributes:
- ID (
str):KeyboardButtonTypeRequestPhoneNumber
No parameters required.
- Returns:
- KeyboardButtonType
- Raises:
telegram.Error
pytglib.api.types.keyboard_button_type_request_poll module¶
Bases:
pytglib.api.utils.object.ObjectA button that allows the user to create and send a poll when pressed; available only in private chats
- Attributes:
- ID (
str):KeyboardButtonTypeRequestPoll - Args:
- force_regular (
bool): - If true, only regular polls must be allowed to create
- force_quiz (
bool): - If true, only polls in quiz mode must be allowed to create
- force_regular (
- Returns:
- KeyboardButtonType
- Raises:
telegram.Error
pytglib.api.types.keyboard_button_type_text module¶
Bases:
pytglib.api.utils.object.ObjectA simple button, with text that must be sent when the button is pressed
- Attributes:
- ID (
str):KeyboardButtonTypeText
No parameters required.
- Returns:
- KeyboardButtonType
- Raises:
telegram.Error
pytglib.api.types.labeled_price_part module¶
-
class
pytglib.api.types.labeled_price_part.LabeledPricePart(label, amount, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectPortion of the price of a product (e.g., “delivery cost”, “tax amount”)
- Attributes:
- ID (
str):LabeledPricePart - Args:
- label (
str): - Label for this portion of the product price
- amount (
int): - Currency amount in the smallest units of the currency
- label (
- Returns:
- LabeledPricePart
- Raises:
telegram.Error
-
ID= 'labeledPricePart'¶
-
static
read(q: dict, *args) → pytglib.api.types.labeled_price_part.LabeledPricePart¶
pytglib.api.types.language_pack_info module¶
-
class
pytglib.api.types.language_pack_info.LanguagePackInfo(id, base_language_pack_id, name, native_name, plural_code, is_official, is_rtl, is_beta, is_installed, total_string_count, translated_string_count, local_string_count, translation_url, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains information about a language pack
- Attributes:
- ID (
str):LanguagePackInfo - Args:
- id (
str): - Unique language pack identifier
- base_language_pack_id (
str): - Identifier of a base language pack; may be emptyIf a string is missed in the language pack, then it must be fetched from base language packUnsupported in custom language packs
- name (
str): - Language name
- native_name (
str): - Name of the language in that language
- plural_code (
str): - A language code to be used to apply plural formsSee https://wwwunicodeorg/cldr/charts/latest/supplemental/language_plural_ruleshtml for more information
- is_official (
bool): - True, if the language pack is official
- is_rtl (
bool): - True, if the language pack strings are RTL
- is_beta (
bool): - True, if the language pack is a beta language pack
- is_installed (
bool): - True, if the language pack is installed by the current user
- total_string_count (
int): - Total number of non-deleted strings from the language pack
- translated_string_count (
int): - Total number of translated strings from the language pack
- local_string_count (
int): - Total number of non-deleted strings from the language pack available locally
- translation_url (
str): - Link to language translation interface; empty for custom local language packs
- id (
- Returns:
- LanguagePackInfo
- Raises:
telegram.Error
-
ID= 'languagePackInfo'¶
-
static
read(q: dict, *args) → pytglib.api.types.language_pack_info.LanguagePackInfo¶
pytglib.api.types.language_pack_string module¶
-
class
pytglib.api.types.language_pack_string.LanguagePackString(key, value, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents one language pack string
- Attributes:
- ID (
str):LanguagePackString - Args:
- key (
str): - String key
- value (
telegram.api.types.LanguagePackStringValue): - String value; pass null if the string needs to be taken from the built-in English language pack
- key (
- Returns:
- LanguagePackString
- Raises:
telegram.Error
-
ID= 'languagePackString'¶
-
static
read(q: dict, *args) → pytglib.api.types.language_pack_string.LanguagePackString¶
pytglib.api.types.language_pack_string_value module¶
-
class
pytglib.api.types.language_pack_string_value.LanguagePackStringValue(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents the value of a string in a language pack
No parameters required.
-
ID= 'languagePackStringValue'¶
-
static
read(q: dict, *args) → LanguagePackStringValuePluralized or LanguagePackStringValueDeleted or LanguagePackStringValueOrdinary¶
-
pytglib.api.types.language_pack_string_value_deleted module¶
-
class
pytglib.api.types.language_pack_string_value_deleted.LanguagePackStringValueDeleted(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA deleted language pack string, the value must be taken from the built-in English language pack
- Attributes:
- ID (
str):LanguagePackStringValueDeleted
No parameters required.
- Returns:
- LanguagePackStringValue
- Raises:
telegram.Error
-
ID= 'languagePackStringValueDeleted'¶
-
static
read(q: dict, *args) → pytglib.api.types.language_pack_string_value_deleted.LanguagePackStringValueDeleted¶
pytglib.api.types.language_pack_string_value_ordinary module¶
-
class
pytglib.api.types.language_pack_string_value_ordinary.LanguagePackStringValueOrdinary(value, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectAn ordinary language pack string
- Attributes:
- ID (
str):LanguagePackStringValueOrdinary - Args:
- value (
str): - String value
- value (
- Returns:
- LanguagePackStringValue
- Raises:
telegram.Error
-
ID= 'languagePackStringValueOrdinary'¶
-
static
read(q: dict, *args) → pytglib.api.types.language_pack_string_value_ordinary.LanguagePackStringValueOrdinary¶
pytglib.api.types.language_pack_string_value_pluralized module¶
-
class
pytglib.api.types.language_pack_string_value_pluralized.LanguagePackStringValuePluralized(zero_value, one_value, two_value, few_value, many_value, other_value, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA language pack string which has different forms based on the number of some object it mentions. See https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html for more information
- Attributes:
- ID (
str):LanguagePackStringValuePluralized - Args:
- zero_value (
str): - Value for zero objects
- one_value (
str): - Value for one object
- two_value (
str): - Value for two objects
- few_value (
str): - Value for few objects
- many_value (
str): - Value for many objects
- other_value (
str): - Default value
- zero_value (
- Returns:
- LanguagePackStringValue
- Raises:
telegram.Error
-
ID= 'languagePackStringValuePluralized'¶
-
static
read(q: dict, *args) → pytglib.api.types.language_pack_string_value_pluralized.LanguagePackStringValuePluralized¶
pytglib.api.types.language_pack_strings module¶
-
class
pytglib.api.types.language_pack_strings.LanguagePackStrings(strings, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains a list of language pack strings
- Attributes:
- ID (
str):LanguagePackStrings - Args:
- strings (List of
telegram.api.types.languagePackString): - A list of language pack strings
- strings (List of
- Returns:
- LanguagePackStrings
- Raises:
telegram.Error
-
ID= 'languagePackStrings'¶
-
static
read(q: dict, *args) → pytglib.api.types.language_pack_strings.LanguagePackStrings¶
pytglib.api.types.local_file module¶
-
class
pytglib.api.types.local_file.LocalFile(path, can_be_downloaded, can_be_deleted, is_downloading_active, is_downloading_completed, download_offset, downloaded_prefix_size, downloaded_size, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents a local file
- Attributes:
- ID (
str):LocalFile - Args:
- path (
str): - Local path to the locally available file part; may be empty
- can_be_downloaded (
bool): - True, if it is possible to download or generate the file
- can_be_deleted (
bool): - True, if the file can be deleted
- is_downloading_active (
bool): - True, if the file is currently being downloaded (or a local copy is being generated by some other means)
- is_downloading_completed (
bool): - True, if the local copy is fully available
- download_offset (
int): - Download will be started from this offsetdownloaded_prefix_size is calculated from this offset
- downloaded_prefix_size (
int): - If is_downloading_completed is false, then only some prefix of the file starting from download_offset is ready to be readdownloaded_prefix_size is the size of that prefix in bytes
- downloaded_size (
int): - Total downloaded file size, in bytesCan be used only for calculating download progressThe actual file size may be bigger, and some parts of it may contain garbage
- path (
- Returns:
- LocalFile
- Raises:
telegram.Error
-
ID= 'localFile'¶
-
static
read(q: dict, *args) → pytglib.api.types.local_file.LocalFile¶
pytglib.api.types.localization_target_info module¶
-
class
pytglib.api.types.localization_target_info.LocalizationTargetInfo(language_packs, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains information about the current localization target
- Attributes:
- ID (
str):LocalizationTargetInfo - Args:
- language_packs (List of
telegram.api.types.languagePackInfo): - List of available language packs for this application
- language_packs (List of
- Returns:
- LocalizationTargetInfo
- Raises:
telegram.Error
-
ID= 'localizationTargetInfo'¶
-
static
read(q: dict, *args) → pytglib.api.types.localization_target_info.LocalizationTargetInfo¶
pytglib.api.types.location module¶
-
class
pytglib.api.types.location.Location(latitude, longitude, horizontal_accuracy, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectDescribes a location on planet Earth
- Attributes:
- ID (
str):Location - Args:
- latitude (
float): - Latitude of the location in degrees; as defined by the sender
- longitude (
float): - Longitude of the location, in degrees; as defined by the sender
- horizontal_accuracy (
float): - The estimated horizontal accuracy of the location, in meters; as defined by the sender0 if unknown
- latitude (
- Returns:
- Location
- Raises:
telegram.Error
-
ID= 'location'¶
-
static
read(q: dict, *args) → pytglib.api.types.location.Location¶
pytglib.api.types.log_stream module¶
-
class
pytglib.api.types.log_stream.LogStream(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectDescribes a stream to which TDLib internal log is written
No parameters required.
-
ID= 'logStream'¶
-
static
read(q: dict, *args) → LogStreamDefault or LogStreamFile or LogStreamEmpty¶
-
pytglib.api.types.log_stream_default module¶
-
class
pytglib.api.types.log_stream_default.LogStreamDefault(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe log is written to stderr or an OS specific log
- Attributes:
- ID (
str):LogStreamDefault
No parameters required.
- Returns:
- LogStream
- Raises:
telegram.Error
-
ID= 'logStreamDefault'¶
-
static
read(q: dict, *args) → pytglib.api.types.log_stream_default.LogStreamDefault¶
pytglib.api.types.log_stream_empty module¶
-
class
pytglib.api.types.log_stream_empty.LogStreamEmpty(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe log is written nowhere
- Attributes:
- ID (
str):LogStreamEmpty
No parameters required.
- Returns:
- LogStream
- Raises:
telegram.Error
-
ID= 'logStreamEmpty'¶
-
static
read(q: dict, *args) → pytglib.api.types.log_stream_empty.LogStreamEmpty¶
pytglib.api.types.log_stream_file module¶
-
class
pytglib.api.types.log_stream_file.LogStreamFile(path, max_file_size, redirect_stderr, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe log is written to a file
- Attributes:
- ID (
str):LogStreamFile - Args:
- path (
str): - Path to the file to where the internal TDLib log will be written
- max_file_size (
int): - The maximum size of the file to where the internal TDLib log is written before the file will automatically be rotated, in bytes
- redirect_stderr (
bool): - Pass true to additionally redirect stderr to the log fileIgnored on Windows
- path (
- Returns:
- LogStream
- Raises:
telegram.Error
-
ID= 'logStreamFile'¶
-
static
read(q: dict, *args) → pytglib.api.types.log_stream_file.LogStreamFile¶
pytglib.api.types.log_tags module¶
Bases:
pytglib.api.utils.object.ObjectContains a list of available TDLib internal log tags
- Attributes:
- ID (
str):LogTags - Args:
- tags (List of
str): - List of log tags
- tags (List of
- Returns:
- LogTags
- Raises:
telegram.Error
pytglib.api.types.log_verbosity_level module¶
-
class
pytglib.api.types.log_verbosity_level.LogVerbosityLevel(verbosity_level, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains a TDLib internal log verbosity level
- Attributes:
- ID (
str):LogVerbosityLevel - Args:
- verbosity_level (
int): - Log verbosity level
- verbosity_level (
- Returns:
- LogVerbosityLevel
- Raises:
telegram.Error
-
ID= 'logVerbosityLevel'¶
-
static
read(q: dict, *args) → pytglib.api.types.log_verbosity_level.LogVerbosityLevel¶
pytglib.api.types.login_url_info module¶
-
class
pytglib.api.types.login_url_info.LoginUrlInfo(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains information about an inline button of type inlineKeyboardButtonTypeLoginUrl
No parameters required.
-
ID= 'loginUrlInfo'¶
-
static
read(q: dict, *args) → LoginUrlInfoRequestConfirmation or LoginUrlInfoOpen¶
-
pytglib.api.types.login_url_info_open module¶
-
class
pytglib.api.types.login_url_info_open.LoginUrlInfoOpen(url, skip_confirm, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectAn HTTP url needs to be open
- Attributes:
- ID (
str):LoginUrlInfoOpen - Args:
- url (
str): - The URL to open
- skip_confirm (
bool): - True, if there is no need to show an ordinary open URL confirm
- url (
- Returns:
- LoginUrlInfo
- Raises:
telegram.Error
-
ID= 'loginUrlInfoOpen'¶
-
static
read(q: dict, *args) → pytglib.api.types.login_url_info_open.LoginUrlInfoOpen¶
pytglib.api.types.login_url_info_request_confirmation module¶
-
class
pytglib.api.types.login_url_info_request_confirmation.LoginUrlInfoRequestConfirmation(url, domain, bot_user_id, request_write_access, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectAn authorization confirmation dialog needs to be shown to the user
- Attributes:
- ID (
str):LoginUrlInfoRequestConfirmation - Args:
- url (
str): - An HTTP URL to be opened
- domain (
str): - A domain of the URL
- bot_user_id (
int): - User identifier of a bot linked with the website
- request_write_access (
bool): - True, if the user needs to be requested to give the permission to the bot to send them messages
- url (
- Returns:
- LoginUrlInfo
- Raises:
telegram.Error
-
ID= 'loginUrlInfoRequestConfirmation'¶
-
static
read(q: dict, *args) → pytglib.api.types.login_url_info_request_confirmation.LoginUrlInfoRequestConfirmation¶
pytglib.api.types.mask_point module¶
-
class
pytglib.api.types.mask_point.MaskPoint(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectPart of the face, relative to which a mask is placed
No parameters required.
-
ID= 'maskPoint'¶
-
static
read(q: dict, *args) → MaskPointEyes or MaskPointForehead or MaskPointMouth or MaskPointChin¶
-
pytglib.api.types.mask_point_chin module¶
-
class
pytglib.api.types.mask_point_chin.MaskPointChin(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe mask is placed relatively to the chin
- Attributes:
- ID (
str):MaskPointChin
No parameters required.
- Returns:
- MaskPoint
- Raises:
telegram.Error
-
ID= 'maskPointChin'¶
-
static
read(q: dict, *args) → pytglib.api.types.mask_point_chin.MaskPointChin¶
pytglib.api.types.mask_point_eyes module¶
-
class
pytglib.api.types.mask_point_eyes.MaskPointEyes(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe mask is placed relatively to the eyes
- Attributes:
- ID (
str):MaskPointEyes
No parameters required.
- Returns:
- MaskPoint
- Raises:
telegram.Error
-
ID= 'maskPointEyes'¶
-
static
read(q: dict, *args) → pytglib.api.types.mask_point_eyes.MaskPointEyes¶
pytglib.api.types.mask_point_forehead module¶
-
class
pytglib.api.types.mask_point_forehead.MaskPointForehead(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe mask is placed relatively to the forehead
- Attributes:
- ID (
str):MaskPointForehead
No parameters required.
- Returns:
- MaskPoint
- Raises:
telegram.Error
-
ID= 'maskPointForehead'¶
-
static
read(q: dict, *args) → pytglib.api.types.mask_point_forehead.MaskPointForehead¶
pytglib.api.types.mask_point_mouth module¶
-
class
pytglib.api.types.mask_point_mouth.MaskPointMouth(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe mask is placed relatively to the mouth
- Attributes:
- ID (
str):MaskPointMouth
No parameters required.
- Returns:
- MaskPoint
- Raises:
telegram.Error
-
ID= 'maskPointMouth'¶
-
static
read(q: dict, *args) → pytglib.api.types.mask_point_mouth.MaskPointMouth¶
pytglib.api.types.mask_position module¶
-
class
pytglib.api.types.mask_position.MaskPosition(point, x_shift, y_shift, scale, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectPosition on a photo where a mask is placed
- Attributes:
- ID (
str):MaskPosition - Args:
- point (
telegram.api.types.MaskPoint): - Part of the face, relative to which the mask is placed
- x_shift (
float): - Shift by X-axis measured in widths of the mask scaled to the face size, from left to right(For example, -10 will place the mask just to the left of the default mask position)
- y_shift (
float): - Shift by Y-axis measured in heights of the mask scaled to the face size, from top to bottom(For example, 10 will place the mask just below the default mask position)
- scale (
float): - Mask scaling coefficient(For example, 20 means a doubled size)
- point (
- Returns:
- MaskPosition
- Raises:
telegram.Error
-
ID= 'maskPosition'¶
-
static
read(q: dict, *args) → pytglib.api.types.mask_position.MaskPosition¶
pytglib.api.types.message module¶
-
class
pytglib.api.types.message.Message(id, sender_id, chat_id, sending_state, scheduling_state, is_outgoing, is_pinned, can_be_edited, can_be_forwarded, can_be_saved, can_be_deleted_only_for_self, can_be_deleted_for_all_users, can_get_added_reactions, can_get_statistics, can_get_message_thread, can_get_viewers, can_get_media_timestamp_links, has_timestamped_media, is_channel_post, contains_unread_mention, date, edit_date, forward_info, interaction_info, unread_reactions, reply_in_chat_id, reply_to_message_id, message_thread_id, ttl, ttl_expires_in, via_bot_user_id, author_signature, media_album_id, restriction_reason, content, reply_markup, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectDescribes a message
- Attributes:
- ID (
str):Message - Args:
- id (
int): - Message identifier; unique for the chat to which the message belongs
- sender_id (
telegram.api.types.MessageSender): - Identifier of the sender of the message
- chat_id (
int): - Chat identifier
- sending_state (
telegram.api.types.MessageSendingState): - The sending state of the message; may be null
- scheduling_state (
telegram.api.types.MessageSchedulingState): - The scheduling state of the message; may be null
- is_outgoing (
bool): - True, if the message is outgoing
- is_pinned (
bool): - True, if the message is pinned
- can_be_edited (
bool): - True, if the message can be editedFor live location and poll messages this fields shows whether editMessageLiveLocation or stopPoll can be used with this message by the application
- can_be_forwarded (
bool): - True, if the message can be forwarded
- can_be_saved (
bool): - True, if content of the message can be saved locally or copied
- can_be_deleted_only_for_self (
bool): - True, if the message can be deleted only for the current user while other users will continue to see it
- can_be_deleted_for_all_users (
bool): - True, if the message can be deleted for all users
- can_get_added_reactions (
bool): - True, if the list of added reactions is available through getMessageAddedReactions
- can_get_statistics (
bool): - True, if the message statistics are available through getMessageStatistics
- can_get_message_thread (
bool): - True, if information about the message thread is available through getMessageThread
- can_get_viewers (
bool): - True, if chat members already viewed the message can be received through getMessageViewers
- can_get_media_timestamp_links (
bool): - True, if media timestamp links can be generated for media timestamp entities in the message text, caption or web page description through getMessageLink
- has_timestamped_media (
bool): - True, if media timestamp entities refers to a media in this message as opposed to a media in the replied message
- is_channel_post (
bool): - True, if the message is a channel postAll messages to channels are channel posts, all other messages are not channel posts
- contains_unread_mention (
bool): - True, if the message contains an unread mention for the current user
- date (
int): - Point in time (Unix timestamp) when the message was sent
- edit_date (
int): - Point in time (Unix timestamp) when the message was last edited
- forward_info (
telegram.api.types.messageForwardInfo): - Information about the initial message sender; may be null
- interaction_info (
telegram.api.types.messageInteractionInfo): - Information about interactions with the message; may be null
- unread_reactions (List of
telegram.api.types.unreadReaction): - Information about unread reactions added to the message
- reply_in_chat_id (
int): - If non-zero, the identifier of the chat to which the replied message belongs; Currently, only messages in the Replies chat can have different reply_in_chat_id and chat_id
- reply_to_message_id (
int): - If non-zero, the identifier of the message this message is replying to; can be the identifier of a deleted message
- message_thread_id (
int): - If non-zero, the identifier of the message thread the message belongs to; unique within the chat to which the message belongs
- ttl (
int): - For self-destructing messages, the message’s TTL (Time To Live), in seconds; 0 if noneTDLib will send updateDeleteMessages or updateMessageContent once the TTL expires
- ttl_expires_in (
float): - Time left before the message expires, in secondsIf the TTL timer isn’t started yet, equals to the value of the ttl field
- via_bot_user_id (
int): - If non-zero, the user identifier of the bot through which this message was sent
- author_signature (
str): - For channel posts and anonymous group messages, optional author signature
- media_album_id (
int): - Unique identifier of an album this message belongs toOnly audios, documents, photos and videos can be grouped together in albums
- restriction_reason (
str): - If non-empty, contains a human-readable description of the reason why access to this message must be restricted
- content (
telegram.api.types.MessageContent): - Content of the message
- reply_markup (
telegram.api.types.ReplyMarkup): - Reply markup for the message; may be null
- id (
- Returns:
- Message
- Raises:
telegram.Error
-
ID= 'message'¶
-
static
read(q: dict, *args) → pytglib.api.types.message.Message¶
pytglib.api.types.message_animation module¶
-
class
pytglib.api.types.message_animation.MessageAnimation(animation, caption, is_secret, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectAn animation message (GIF-style).
- Attributes:
- ID (
str):MessageAnimation - Args:
- animation (
telegram.api.types.animation): - The animation description
- caption (
telegram.api.types.formattedText): - Animation caption
- is_secret (
bool): - True, if the animation thumbnail must be blurred and the animation must be shown only while tapped
- animation (
- Returns:
- MessageContent
- Raises:
telegram.Error
-
ID= 'messageAnimation'¶
-
static
read(q: dict, *args) → pytglib.api.types.message_animation.MessageAnimation¶
pytglib.api.types.message_audio module¶
-
class
pytglib.api.types.message_audio.MessageAudio(audio, caption, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectAn audio message
- Attributes:
- ID (
str):MessageAudio - Args:
- audio (
telegram.api.types.audio): - The audio description
- caption (
telegram.api.types.formattedText): - Audio caption
- audio (
- Returns:
- MessageContent
- Raises:
telegram.Error
-
ID= 'messageAudio'¶
-
static
read(q: dict, *args) → pytglib.api.types.message_audio.MessageAudio¶
pytglib.api.types.message_basic_group_chat_create module¶
-
class
pytglib.api.types.message_basic_group_chat_create.MessageBasicGroupChatCreate(title, member_user_ids, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA newly created basic group
- Attributes:
- ID (
str):MessageBasicGroupChatCreate - Args:
- title (
str): - Title of the basic group
- member_user_ids (List of
int): - User identifiers of members in the basic group
- title (
- Returns:
- MessageContent
- Raises:
telegram.Error
-
ID= 'messageBasicGroupChatCreate'¶
-
static
read(q: dict, *args) → pytglib.api.types.message_basic_group_chat_create.MessageBasicGroupChatCreate¶
pytglib.api.types.message_call module¶
-
class
pytglib.api.types.message_call.MessageCall(is_video, discard_reason, duration, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA message with information about an ended call
- Attributes:
- ID (
str):MessageCall - Args:
- is_video (
bool): - True, if the call was a video call
- discard_reason (
telegram.api.types.CallDiscardReason): - Reason why the call was discarded
- duration (
int): - Call duration, in seconds
- is_video (
- Returns:
- MessageContent
- Raises:
telegram.Error
-
ID= 'messageCall'¶
-
static
read(q: dict, *args) → pytglib.api.types.message_call.MessageCall¶
pytglib.api.types.message_chat_add_members module¶
-
class
pytglib.api.types.message_chat_add_members.MessageChatAddMembers(member_user_ids, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectNew chat members were added
- Attributes:
- ID (
str):MessageChatAddMembers - Args:
- member_user_ids (List of
int): - User identifiers of the new members
- member_user_ids (List of
- Returns:
- MessageContent
- Raises:
telegram.Error
-
ID= 'messageChatAddMembers'¶
-
static
read(q: dict, *args) → pytglib.api.types.message_chat_add_members.MessageChatAddMembers¶
pytglib.api.types.message_chat_change_photo module¶
-
class
pytglib.api.types.message_chat_change_photo.MessageChatChangePhoto(photo, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectAn updated chat photo
- Attributes:
- ID (
str):MessageChatChangePhoto - Args:
- photo (
telegram.api.types.chatPhoto): - New chat photo
- photo (
- Returns:
- MessageContent
- Raises:
telegram.Error
-
ID= 'messageChatChangePhoto'¶
-
static
read(q: dict, *args) → pytglib.api.types.message_chat_change_photo.MessageChatChangePhoto¶
pytglib.api.types.message_chat_change_title module¶
-
class
pytglib.api.types.message_chat_change_title.MessageChatChangeTitle(title, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectAn updated chat title
- Attributes:
- ID (
str):MessageChatChangeTitle - Args:
- title (
str): - New chat title
- title (
- Returns:
- MessageContent
- Raises:
telegram.Error
-
ID= 'messageChatChangeTitle'¶
-
static
read(q: dict, *args) → pytglib.api.types.message_chat_change_title.MessageChatChangeTitle¶
pytglib.api.types.message_chat_delete_member module¶
-
class
pytglib.api.types.message_chat_delete_member.MessageChatDeleteMember(user_id, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA chat member was deleted
- Attributes:
- ID (
str):MessageChatDeleteMember - Args:
- user_id (
int): - User identifier of the deleted chat member
- user_id (
- Returns:
- MessageContent
- Raises:
telegram.Error
-
ID= 'messageChatDeleteMember'¶
-
static
read(q: dict, *args) → pytglib.api.types.message_chat_delete_member.MessageChatDeleteMember¶
pytglib.api.types.message_chat_delete_photo module¶
-
class
pytglib.api.types.message_chat_delete_photo.MessageChatDeletePhoto(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA deleted chat photo
- Attributes:
- ID (
str):MessageChatDeletePhoto
No parameters required.
- Returns:
- MessageContent
- Raises:
telegram.Error
-
ID= 'messageChatDeletePhoto'¶
-
static
read(q: dict, *args) → pytglib.api.types.message_chat_delete_photo.MessageChatDeletePhoto¶
pytglib.api.types.message_chat_join_by_link module¶
-
class
pytglib.api.types.message_chat_join_by_link.MessageChatJoinByLink(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA new member joined the chat via an invite link
- Attributes:
- ID (
str):MessageChatJoinByLink
No parameters required.
- Returns:
- MessageContent
- Raises:
telegram.Error
-
ID= 'messageChatJoinByLink'¶
-
static
read(q: dict, *args) → pytglib.api.types.message_chat_join_by_link.MessageChatJoinByLink¶
pytglib.api.types.message_chat_set_ttl module¶
-
class
pytglib.api.types.message_chat_set_ttl.MessageChatSetTtl(ttl, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe TTL (Time To Live) setting for messages in the chat has been changed
- Attributes:
- ID (
str):MessageChatSetTtl - Args:
- ttl (
int): - New message TTL
- ttl (
- Returns:
- MessageContent
- Raises:
telegram.Error
-
ID= 'messageChatSetTtl'¶
-
static
read(q: dict, *args) → pytglib.api.types.message_chat_set_ttl.MessageChatSetTtl¶
pytglib.api.types.message_chat_upgrade_from module¶
-
class
pytglib.api.types.message_chat_upgrade_from.MessageChatUpgradeFrom(title, basic_group_id, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA supergroup has been created from a basic group
- Attributes:
- ID (
str):MessageChatUpgradeFrom - Args:
- title (
str): - Title of the newly created supergroup
- basic_group_id (
int): - The identifier of the original basic group
- title (
- Returns:
- MessageContent
- Raises:
telegram.Error
-
ID= 'messageChatUpgradeFrom'¶
-
static
read(q: dict, *args) → pytglib.api.types.message_chat_upgrade_from.MessageChatUpgradeFrom¶
pytglib.api.types.message_chat_upgrade_to module¶
-
class
pytglib.api.types.message_chat_upgrade_to.MessageChatUpgradeTo(supergroup_id, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA basic group was upgraded to a supergroup and was deactivated as the result
- Attributes:
- ID (
str):MessageChatUpgradeTo - Args:
- supergroup_id (
int): - Identifier of the supergroup to which the basic group was upgraded
- supergroup_id (
- Returns:
- MessageContent
- Raises:
telegram.Error
-
ID= 'messageChatUpgradeTo'¶
-
static
read(q: dict, *args) → pytglib.api.types.message_chat_upgrade_to.MessageChatUpgradeTo¶
pytglib.api.types.message_contact module¶
-
class
pytglib.api.types.message_contact.MessageContact(contact, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA message with a user contact
- Attributes:
- ID (
str):MessageContact - Args:
- contact (
telegram.api.types.contact): - The contact description
- contact (
- Returns:
- MessageContent
- Raises:
telegram.Error
-
ID= 'messageContact'¶
-
static
read(q: dict, *args) → pytglib.api.types.message_contact.MessageContact¶
pytglib.api.types.message_contact_registered module¶
-
class
pytglib.api.types.message_contact_registered.MessageContactRegistered(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA contact has registered with Telegram
- Attributes:
- ID (
str):MessageContactRegistered
No parameters required.
- Returns:
- MessageContent
- Raises:
telegram.Error
-
ID= 'messageContactRegistered'¶
-
static
read(q: dict, *args) → pytglib.api.types.message_contact_registered.MessageContactRegistered¶
pytglib.api.types.message_content module¶
-
class
pytglib.api.types.message_content.MessageContent(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains the content of a message
No parameters required.
-
ID= 'messageContent'¶
-
static
read(q: dict, *args) → MessageExpiredVideo or MessageChatUpgradeFrom or MessageChatChangeTitle or MessageSticker or MessageDocument or MessageText or MessageVideoChatStarted or MessagePassportDataSent or MessageLocation or MessageUnsupported or MessageDice or MessageProximityAlertTriggered or MessageVideoChatScheduled or MessagePinMessage or MessageChatJoinByLink or MessageChatDeleteMember or MessageScreenshotTaken or MessageChatAddMembers or MessageAnimation or MessageSupergroupChatCreate or MessageWebAppDataSent or MessagePaymentSuccessful or MessageChatUpgradeTo or MessageExpiredPhoto or MessageWebAppDataReceived or MessageContactRegistered or MessageChatDeletePhoto or MessageInvoice or MessageBasicGroupChatCreate or MessageAnimatedEmoji or MessageVenue or MessageVoiceNote or MessageCall or MessagePhoto or MessageVideoNote or MessageAudio or MessageVideo or MessageContact or MessageChatChangePhoto or MessagePaymentSuccessfulBot or MessageInviteVideoChatParticipants or MessageChatJoinByRequest or MessageCustomServiceAction or MessageChatSetTtl or MessageVideoChatEnded or MessageGame or MessagePoll or MessagePassportDataReceived or MessageWebsiteConnected or MessageChatSetTheme or MessageGameScore¶
-
pytglib.api.types.message_custom_service_action module¶
-
class
pytglib.api.types.message_custom_service_action.MessageCustomServiceAction(text, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA non-standard action has happened in the chat
- Attributes:
- ID (
str):MessageCustomServiceAction - Args:
- text (
str): - Message text to be shown in the chat
- text (
- Returns:
- MessageContent
- Raises:
telegram.Error
-
ID= 'messageCustomServiceAction'¶
-
static
read(q: dict, *args) → pytglib.api.types.message_custom_service_action.MessageCustomServiceAction¶
pytglib.api.types.message_dice module¶
-
class
pytglib.api.types.message_dice.MessageDice(initial_state, final_state, emoji, value, success_animation_frame_number, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA dice message. The dice value is randomly generated by the server
- Attributes:
- ID (
str):MessageDice - Args:
- initial_state (
telegram.api.types.DiceStickers): - The animated stickers with the initial dice animation; may be null if unknownupdateMessageContent will be sent when the sticker became known
- final_state (
telegram.api.types.DiceStickers): - The animated stickers with the final dice animation; may be null if unknownupdateMessageContent will be sent when the sticker became known
- emoji (
str): - Emoji on which the dice throw animation is based
- value (
int): - The dice valueIf the value is 0, the dice don’t have final state yet
- success_animation_frame_number (
int): - Number of frame after which a success animation like a shower of confetti needs to be shown on updateMessageSendSucceeded
- initial_state (
- Returns:
- MessageContent
- Raises:
telegram.Error
-
ID= 'messageDice'¶
-
static
read(q: dict, *args) → pytglib.api.types.message_dice.MessageDice¶
pytglib.api.types.message_document module¶
-
class
pytglib.api.types.message_document.MessageDocument(document, caption, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA document message (general file)
- Attributes:
- ID (
str):MessageDocument - Args:
- document (
telegram.api.types.document): - The document description
- caption (
telegram.api.types.formattedText): - Document caption
- document (
- Returns:
- MessageContent
- Raises:
telegram.Error
-
ID= 'messageDocument'¶
-
static
read(q: dict, *args) → pytglib.api.types.message_document.MessageDocument¶
pytglib.api.types.message_expired_photo module¶
-
class
pytglib.api.types.message_expired_photo.MessageExpiredPhoto(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectAn expired photo message (self-destructed after TTL has elapsed)
- Attributes:
- ID (
str):MessageExpiredPhoto
No parameters required.
- Returns:
- MessageContent
- Raises:
telegram.Error
-
ID= 'messageExpiredPhoto'¶
-
static
read(q: dict, *args) → pytglib.api.types.message_expired_photo.MessageExpiredPhoto¶
pytglib.api.types.message_expired_video module¶
-
class
pytglib.api.types.message_expired_video.MessageExpiredVideo(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectAn expired video message (self-destructed after TTL has elapsed)
- Attributes:
- ID (
str):MessageExpiredVideo
No parameters required.
- Returns:
- MessageContent
- Raises:
telegram.Error
-
ID= 'messageExpiredVideo'¶
-
static
read(q: dict, *args) → pytglib.api.types.message_expired_video.MessageExpiredVideo¶
pytglib.api.types.message_forward_info module¶
-
class
pytglib.api.types.message_forward_info.MessageForwardInfo(origin, date, public_service_announcement_type, from_chat_id, from_message_id, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains information about a forwarded message
- Attributes:
- ID (
str):MessageForwardInfo - Args:
- origin (
telegram.api.types.MessageForwardOrigin): - Origin of a forwarded message
- date (
int): - Point in time (Unix timestamp) when the message was originally sent
- public_service_announcement_type (
str): - The type of a public service announcement for the forwarded message
- from_chat_id (
int): - For messages forwarded to the chat with the current user (Saved Messages), to the Replies bot chat, or to the channel’s discussion group, the identifier of the chat from which the message was forwarded last time; 0 if unknown
- from_message_id (
int): - For messages forwarded to the chat with the current user (Saved Messages), to the Replies bot chat, or to the channel’s discussion group, the identifier of the original message from which the new message was forwarded last time; 0 if unknown
- origin (
- Returns:
- MessageForwardInfo
- Raises:
telegram.Error
-
ID= 'messageForwardInfo'¶
-
static
read(q: dict, *args) → pytglib.api.types.message_forward_info.MessageForwardInfo¶
pytglib.api.types.message_forward_origin module¶
-
class
pytglib.api.types.message_forward_origin.MessageForwardOrigin(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains information about the origin of a forwarded message
No parameters required.
-
ID= 'messageForwardOrigin'¶
-
static
read(q: dict, *args) → MessageForwardOriginChat or MessageForwardOriginMessageImport or MessageForwardOriginHiddenUser or MessageForwardOriginChannel or MessageForwardOriginUser¶
-
pytglib.api.types.message_forward_origin_channel module¶
-
class
pytglib.api.types.message_forward_origin_channel.MessageForwardOriginChannel(chat_id, message_id, author_signature, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe message was originally a post in a channel
- Attributes:
- ID (
str):MessageForwardOriginChannel - Args:
- chat_id (
int): - Identifier of the chat from which the message was originally forwarded
- message_id (
int): - Message identifier of the original message
- author_signature (
str): - Original post author signature
- chat_id (
- Returns:
- MessageForwardOrigin
- Raises:
telegram.Error
-
ID= 'messageForwardOriginChannel'¶
-
static
read(q: dict, *args) → pytglib.api.types.message_forward_origin_channel.MessageForwardOriginChannel¶
pytglib.api.types.message_forward_origin_user module¶
-
class
pytglib.api.types.message_forward_origin_user.MessageForwardOriginUser(sender_user_id, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe message was originally sent by a known user
- Attributes:
- ID (
str):MessageForwardOriginUser - Args:
- sender_user_id (
int): - Identifier of the user that originally sent the message
- sender_user_id (
- Returns:
- MessageForwardOrigin
- Raises:
telegram.Error
-
ID= 'messageForwardOriginUser'¶
-
static
read(q: dict, *args) → pytglib.api.types.message_forward_origin_user.MessageForwardOriginUser¶
pytglib.api.types.message_game module¶
-
class
pytglib.api.types.message_game.MessageGame(game, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA message with a game
- Attributes:
- ID (
str):MessageGame - Args:
- game (
telegram.api.types.game): - The game description
- game (
- Returns:
- MessageContent
- Raises:
telegram.Error
-
ID= 'messageGame'¶
-
static
read(q: dict, *args) → pytglib.api.types.message_game.MessageGame¶
pytglib.api.types.message_game_score module¶
-
class
pytglib.api.types.message_game_score.MessageGameScore(game_message_id, game_id, score, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA new high score was achieved in a game
- Attributes:
- ID (
str):MessageGameScore - Args:
- game_message_id (
int): - Identifier of the message with the game, can be an identifier of a deleted message
- game_id (
int): - Identifier of the game; may be different from the games presented in the message with the game
- score (
int): - New score
- game_message_id (
- Returns:
- MessageContent
- Raises:
telegram.Error
-
ID= 'messageGameScore'¶
-
static
read(q: dict, *args) → pytglib.api.types.message_game_score.MessageGameScore¶
pytglib.api.types.message_invoice module¶
-
class
pytglib.api.types.message_invoice.MessageInvoice(title, description, photo, currency, total_amount, start_parameter, is_test, need_shipping_address, receipt_message_id, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA message with an invoice from a bot
- Attributes:
- ID (
str):MessageInvoice - Args:
- title (
str): - Product title
- description (
telegram.api.types.formattedText): - Product description
- photo (
telegram.api.types.photo): - Product photo; may be null
- currency (
str): - Currency for the product price
- total_amount (
int): - Product total price in the smallest units of the currency
- start_parameter (
str): - Unique invoice bot start_parameterTo share an invoice use the URL https://tme/{bot_username}?start={start_parameter}
- is_test (
bool): - True, if the invoice is a test invoice
- need_shipping_address (
bool): - True, if the shipping address must be specified
- receipt_message_id (
int): - The identifier of the message with the receipt, after the product has been purchased
- title (
- Returns:
- MessageContent
- Raises:
telegram.Error
-
ID= 'messageInvoice'¶
-
static
read(q: dict, *args) → pytglib.api.types.message_invoice.MessageInvoice¶
pytglib.api.types.message_link_info module¶
-
class
pytglib.api.types.message_link_info.MessageLinkInfo(is_public, chat_id, message, media_timestamp, for_album, for_comment, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains information about a link to a message in a chat
- Attributes:
- ID (
str):MessageLinkInfo - Args:
- is_public (
bool): - True, if the link is a public link for a message in a chat
- chat_id (
int): - If found, identifier of the chat to which the message belongs, 0 otherwise
- message (
telegram.api.types.message): - If found, the linked message; may be null
- media_timestamp (
int): - Timestamp from which the video/audio/video note/voice note playing must start, in seconds; 0 if not specifiedThe media can be in the message content or in its web page preview
- for_album (
bool): - True, if the whole media album to which the message belongs is linked
- for_comment (
bool): - True, if the message is linked as a channel post comment or from a message thread
- is_public (
- Returns:
- MessageLinkInfo
- Raises:
telegram.Error
-
ID= 'messageLinkInfo'¶
-
static
read(q: dict, *args) → pytglib.api.types.message_link_info.MessageLinkInfo¶
pytglib.api.types.message_location module¶
-
class
pytglib.api.types.message_location.MessageLocation(location, live_period, expires_in, heading, proximity_alert_radius, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA message with a location
- Attributes:
- ID (
str):MessageLocation - Args:
- location (
telegram.api.types.location): - The location description
- live_period (
int): - Time relative to the message send date, for which the location can be updated, in seconds
- expires_in (
int): - Left time for which the location can be updated, in secondsupdateMessageContent is not sent when this field changes
- heading (
int): - For live locations, a direction in which the location moves, in degrees; 1-360If 0 the direction is unknown
- proximity_alert_radius (
int): - For live locations, a maximum distance to another chat member for proximity alerts, in meters (0-100000)0 if the notification is disabledAvailable only for the message sender
- location (
- Returns:
- MessageContent
- Raises:
telegram.Error
-
ID= 'messageLocation'¶
-
static
read(q: dict, *args) → pytglib.api.types.message_location.MessageLocation¶
pytglib.api.types.message_passport_data_received module¶
-
class
pytglib.api.types.message_passport_data_received.MessagePassportDataReceived(elements, credentials, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectTelegram Passport data has been received; for bots only
- Attributes:
- ID (
str):MessagePassportDataReceived - Args:
- elements (List of
telegram.api.types.encryptedPassportElement): - List of received Telegram Passport elements
- credentials (
telegram.api.types.encryptedCredentials): - Encrypted data credentials
- elements (List of
- Returns:
- MessageContent
- Raises:
telegram.Error
-
ID= 'messagePassportDataReceived'¶
-
static
read(q: dict, *args) → pytglib.api.types.message_passport_data_received.MessagePassportDataReceived¶
pytglib.api.types.message_passport_data_sent module¶
-
class
pytglib.api.types.message_passport_data_sent.MessagePassportDataSent(types, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectTelegram Passport data has been sent to a bot
- Attributes:
- ID (
str):MessagePassportDataSent - Args:
- types (List of
telegram.api.types.PassportElementType): - List of Telegram Passport element types sent
- types (List of
- Returns:
- MessageContent
- Raises:
telegram.Error
-
ID= 'messagePassportDataSent'¶
-
static
read(q: dict, *args) → pytglib.api.types.message_passport_data_sent.MessagePassportDataSent¶
pytglib.api.types.message_payment_successful module¶
-
class
pytglib.api.types.message_payment_successful.MessagePaymentSuccessful(invoice_chat_id, invoice_message_id, currency, total_amount, is_recurring, is_first_recurring, invoice_name, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA payment has been completed
- Attributes:
- ID (
str):MessagePaymentSuccessful - Args:
- invoice_chat_id (
int): - Identifier of the chat, containing the corresponding invoice message; 0 if unknown
- invoice_message_id (
int): - Identifier of the message with the corresponding invoice; can be 0 or an identifier of a deleted message
- currency (
str): - Currency for the price of the product
- total_amount (
int): - Total price for the product, in the smallest units of the currency
- is_recurring (
bool): - True, if this is a recurring payment
- is_first_recurring (
bool): - True, if this is the first recurring payment
- invoice_name (
str): - Name of the invoice; may be empty if unknown
- invoice_chat_id (
- Returns:
- MessageContent
- Raises:
telegram.Error
-
ID= 'messagePaymentSuccessful'¶
-
static
read(q: dict, *args) → pytglib.api.types.message_payment_successful.MessagePaymentSuccessful¶
pytglib.api.types.message_payment_successful_bot module¶
-
class
pytglib.api.types.message_payment_successful_bot.MessagePaymentSuccessfulBot(currency, total_amount, is_recurring, is_first_recurring, invoice_payload, shipping_option_id, order_info, telegram_payment_charge_id, provider_payment_charge_id, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA payment has been completed; for bots only
- Attributes:
- ID (
str):MessagePaymentSuccessfulBot - Args:
- currency (
str): - Currency for price of the product
- total_amount (
int): - Total price for the product, in the smallest units of the currency
- is_recurring (
bool): - True, if this is a recurring payment
- is_first_recurring (
bool): - True, if this is the first recurring payment
- invoice_payload (
bytes): - Invoice payload
- shipping_option_id (
str): - Identifier of the shipping option chosen by the user; may be empty if not applicable
- order_info (
telegram.api.types.orderInfo): - Information about the order; may be null
- telegram_payment_charge_id (
str): - Telegram payment identifier
- provider_payment_charge_id (
str): - Provider payment identifier
- currency (
- Returns:
- MessageContent
- Raises:
telegram.Error
-
ID= 'messagePaymentSuccessfulBot'¶
-
static
read(q: dict, *args) → pytglib.api.types.message_payment_successful_bot.MessagePaymentSuccessfulBot¶
pytglib.api.types.message_photo module¶
-
class
pytglib.api.types.message_photo.MessagePhoto(photo, caption, is_secret, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA photo message
- Attributes:
- ID (
str):MessagePhoto - Args:
- photo (
telegram.api.types.photo): - The photo description
- caption (
telegram.api.types.formattedText): - Photo caption
- is_secret (
bool): - True, if the photo must be blurred and must be shown only while tapped
- photo (
- Returns:
- MessageContent
- Raises:
telegram.Error
-
ID= 'messagePhoto'¶
-
static
read(q: dict, *args) → pytglib.api.types.message_photo.MessagePhoto¶
pytglib.api.types.message_pin_message module¶
-
class
pytglib.api.types.message_pin_message.MessagePinMessage(message_id, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA message has been pinned
- Attributes:
- ID (
str):MessagePinMessage - Args:
- message_id (
int): - Identifier of the pinned message, can be an identifier of a deleted message or 0
- message_id (
- Returns:
- MessageContent
- Raises:
telegram.Error
-
ID= 'messagePinMessage'¶
-
static
read(q: dict, *args) → pytglib.api.types.message_pin_message.MessagePinMessage¶
pytglib.api.types.message_poll module¶
-
class
pytglib.api.types.message_poll.MessagePoll(poll, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA message with a poll
- Attributes:
- ID (
str):MessagePoll - Args:
- poll (
telegram.api.types.poll): - The poll description
- poll (
- Returns:
- MessageContent
- Raises:
telegram.Error
-
ID= 'messagePoll'¶
-
static
read(q: dict, *args) → pytglib.api.types.message_poll.MessagePoll¶
pytglib.api.types.message_scheduling_state module¶
-
class
pytglib.api.types.message_scheduling_state.MessageSchedulingState(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains information about the time when a scheduled message will be sent
No parameters required.
-
ID= 'messageSchedulingState'¶
-
static
read(q: dict, *args) → MessageSchedulingStateSendAtDate or MessageSchedulingStateSendWhenOnline¶
-
pytglib.api.types.message_scheduling_state_send_at_date module¶
-
class
pytglib.api.types.message_scheduling_state_send_at_date.MessageSchedulingStateSendAtDate(send_date, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe message will be sent at the specified date
- Attributes:
- ID (
str):MessageSchedulingStateSendAtDate - Args:
- send_date (
int): - Date the message will be sentThe date must be within 367 days in the future
- send_date (
- Returns:
- MessageSchedulingState
- Raises:
telegram.Error
-
ID= 'messageSchedulingStateSendAtDate'¶
-
static
read(q: dict, *args) → pytglib.api.types.message_scheduling_state_send_at_date.MessageSchedulingStateSendAtDate¶
pytglib.api.types.message_scheduling_state_send_when_online module¶
-
class
pytglib.api.types.message_scheduling_state_send_when_online.MessageSchedulingStateSendWhenOnline(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe message will be sent when the peer will be online. Applicable to private chats only and when the exact online status of the peer is known
- Attributes:
- ID (
str):MessageSchedulingStateSendWhenOnline
No parameters required.
- Returns:
- MessageSchedulingState
- Raises:
telegram.Error
-
ID= 'messageSchedulingStateSendWhenOnline'¶
-
static
read(q: dict, *args) → pytglib.api.types.message_scheduling_state_send_when_online.MessageSchedulingStateSendWhenOnline¶
pytglib.api.types.message_screenshot_taken module¶
-
class
pytglib.api.types.message_screenshot_taken.MessageScreenshotTaken(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA screenshot of a message in the chat has been taken
- Attributes:
- ID (
str):MessageScreenshotTaken
No parameters required.
- Returns:
- MessageContent
- Raises:
telegram.Error
-
ID= 'messageScreenshotTaken'¶
-
static
read(q: dict, *args) → pytglib.api.types.message_screenshot_taken.MessageScreenshotTaken¶
pytglib.api.types.message_sending_state module¶
-
class
pytglib.api.types.message_sending_state.MessageSendingState(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains information about the sending state of the message
No parameters required.
-
ID= 'messageSendingState'¶
-
static
read(q: dict, *args) → MessageSendingStatePending or MessageSendingStateFailed¶
-
pytglib.api.types.message_sending_state_failed module¶
-
class
pytglib.api.types.message_sending_state_failed.MessageSendingStateFailed(error_code, error_message, can_retry, need_another_sender, retry_after, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe message failed to be sent
- Attributes:
- ID (
str):MessageSendingStateFailed - Args:
- error_code (
int): - An error code; 0 if unknown
- error_message (
str): - Error message
- can_retry (
bool): - True, if the message can be re-sent
- need_another_sender (
bool): - True, if the message can be re-sent only on behalf of a different sender
- retry_after (
float): - Time left before the message can be re-sent, in secondsNo update is sent when this field changes
- error_code (
- Returns:
- MessageSendingState
- Raises:
telegram.Error
-
ID= 'messageSendingStateFailed'¶
-
static
read(q: dict, *args) → pytglib.api.types.message_sending_state_failed.MessageSendingStateFailed¶
pytglib.api.types.message_sending_state_pending module¶
-
class
pytglib.api.types.message_sending_state_pending.MessageSendingStatePending(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe message is being sent now, but has not yet been delivered to the server
- Attributes:
- ID (
str):MessageSendingStatePending
No parameters required.
- Returns:
- MessageSendingState
- Raises:
telegram.Error
-
ID= 'messageSendingStatePending'¶
-
static
read(q: dict, *args) → pytglib.api.types.message_sending_state_pending.MessageSendingStatePending¶
pytglib.api.types.message_sticker module¶
-
class
pytglib.api.types.message_sticker.MessageSticker(sticker, is_premium, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA sticker message
- Attributes:
- ID (
str):MessageSticker - Args:
- sticker (
telegram.api.types.sticker): - The sticker description
- is_premium (
bool): - True, if premium animation of the sticker must be played
- sticker (
- Returns:
- MessageContent
- Raises:
telegram.Error
-
ID= 'messageSticker'¶
-
static
read(q: dict, *args) → pytglib.api.types.message_sticker.MessageSticker¶
pytglib.api.types.message_supergroup_chat_create module¶
-
class
pytglib.api.types.message_supergroup_chat_create.MessageSupergroupChatCreate(title, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA newly created supergroup or channel
- Attributes:
- ID (
str):MessageSupergroupChatCreate - Args:
- title (
str): - Title of the supergroup or channel
- title (
- Returns:
- MessageContent
- Raises:
telegram.Error
-
ID= 'messageSupergroupChatCreate'¶
-
static
read(q: dict, *args) → pytglib.api.types.message_supergroup_chat_create.MessageSupergroupChatCreate¶
pytglib.api.types.message_text module¶
-
class
pytglib.api.types.message_text.MessageText(text, web_page, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA text message
- Attributes:
- ID (
str):MessageText - Args:
- text (
telegram.api.types.formattedText): - Text of the message
- web_page (
telegram.api.types.webPage): - A preview of the web page that’s mentioned in the text; may be null
- text (
- Returns:
- MessageContent
- Raises:
telegram.Error
-
ID= 'messageText'¶
-
static
read(q: dict, *args) → pytglib.api.types.message_text.MessageText¶
pytglib.api.types.message_unsupported module¶
-
class
pytglib.api.types.message_unsupported.MessageUnsupported(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectMessage content that is not supported in the current TDLib version
- Attributes:
- ID (
str):MessageUnsupported
No parameters required.
- Returns:
- MessageContent
- Raises:
telegram.Error
-
ID= 'messageUnsupported'¶
-
static
read(q: dict, *args) → pytglib.api.types.message_unsupported.MessageUnsupported¶
pytglib.api.types.message_venue module¶
-
class
pytglib.api.types.message_venue.MessageVenue(venue, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA message with information about a venue
- Attributes:
- ID (
str):MessageVenue - Args:
- venue (
telegram.api.types.venue): - The venue description
- venue (
- Returns:
- MessageContent
- Raises:
telegram.Error
-
ID= 'messageVenue'¶
-
static
read(q: dict, *args) → pytglib.api.types.message_venue.MessageVenue¶
pytglib.api.types.message_video module¶
-
class
pytglib.api.types.message_video.MessageVideo(video, caption, is_secret, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA video message
- Attributes:
- ID (
str):MessageVideo - Args:
- video (
telegram.api.types.video): - The video description
- caption (
telegram.api.types.formattedText): - Video caption
- is_secret (
bool): - True, if the video thumbnail must be blurred and the video must be shown only while tapped
- video (
- Returns:
- MessageContent
- Raises:
telegram.Error
-
ID= 'messageVideo'¶
-
static
read(q: dict, *args) → pytglib.api.types.message_video.MessageVideo¶
pytglib.api.types.message_video_note module¶
-
class
pytglib.api.types.message_video_note.MessageVideoNote(video_note, is_viewed, is_secret, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA video note message
- Attributes:
- ID (
str):MessageVideoNote - Args:
- video_note (
telegram.api.types.videoNote): - The video note description
- is_viewed (
bool): - True, if at least one of the recipients has viewed the video note
- is_secret (
bool): - True, if the video note thumbnail must be blurred and the video note must be shown only while tapped
- video_note (
- Returns:
- MessageContent
- Raises:
telegram.Error
-
ID= 'messageVideoNote'¶
-
static
read(q: dict, *args) → pytglib.api.types.message_video_note.MessageVideoNote¶
pytglib.api.types.message_voice_note module¶
-
class
pytglib.api.types.message_voice_note.MessageVoiceNote(voice_note, caption, is_listened, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA voice note message
- Attributes:
- ID (
str):MessageVoiceNote - Args:
- voice_note (
telegram.api.types.voiceNote): - The voice note description
- caption (
telegram.api.types.formattedText): - Voice note caption
- is_listened (
bool): - True, if at least one of the recipients has listened to the voice note
- voice_note (
- Returns:
- MessageContent
- Raises:
telegram.Error
-
ID= 'messageVoiceNote'¶
-
static
read(q: dict, *args) → pytglib.api.types.message_voice_note.MessageVoiceNote¶
pytglib.api.types.message_website_connected module¶
-
class
pytglib.api.types.message_website_connected.MessageWebsiteConnected(domain_name, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe current user has connected a website by logging in using Telegram Login Widget on it
- Attributes:
- ID (
str):MessageWebsiteConnected - Args:
- domain_name (
str): - Domain name of the connected website
- domain_name (
- Returns:
- MessageContent
- Raises:
telegram.Error
-
ID= 'messageWebsiteConnected'¶
-
static
read(q: dict, *args) → pytglib.api.types.message_website_connected.MessageWebsiteConnected¶
pytglib.api.types.messages module¶
-
class
pytglib.api.types.messages.Messages(total_count, messages, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains a list of messages
- Attributes:
- ID (
str):Messages - Args:
- total_count (
int): - Approximate total number of messages found
- messages (List of
telegram.api.types.message): - List of messages; messages may be null
- total_count (
- Returns:
- Messages
- Raises:
telegram.Error
-
ID= 'messages'¶
-
static
read(q: dict, *args) → pytglib.api.types.messages.Messages¶
pytglib.api.types.minithumbnail module¶
-
class
pytglib.api.types.minithumbnail.Minithumbnail(width, height, data, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThumbnail image of a very poor quality and low resolution
- Attributes:
- ID (
str):Minithumbnail - Args:
- width (
int): - Thumbnail width, usually doesn’t exceed 40
- height (
int): - Thumbnail height, usually doesn’t exceed 40
- data (
bytes): - The thumbnail in JPEG format
- width (
- Returns:
- Minithumbnail
- Raises:
telegram.Error
-
ID= 'minithumbnail'¶
-
static
read(q: dict, *args) → pytglib.api.types.minithumbnail.Minithumbnail¶
pytglib.api.types.network_statistics module¶
-
class
pytglib.api.types.network_statistics.NetworkStatistics(since_date, entries, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA full list of available network statistic entries
- Attributes:
- ID (
str):NetworkStatistics - Args:
- since_date (
int): - Point in time (Unix timestamp) from which the statistics are collected
- entries (List of
telegram.api.types.NetworkStatisticsEntry): - Network statistics entries
- since_date (
- Returns:
- NetworkStatistics
- Raises:
telegram.Error
-
ID= 'networkStatistics'¶
-
static
read(q: dict, *args) → pytglib.api.types.network_statistics.NetworkStatistics¶
pytglib.api.types.network_statistics_entry module¶
-
class
pytglib.api.types.network_statistics_entry.NetworkStatisticsEntry(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains statistics about network usage
No parameters required.
-
ID= 'networkStatisticsEntry'¶
-
static
read(q: dict, *args) → NetworkStatisticsEntryCall or NetworkStatisticsEntryFile¶
-
pytglib.api.types.network_statistics_entry_call module¶
-
class
pytglib.api.types.network_statistics_entry_call.NetworkStatisticsEntryCall(network_type, sent_bytes, received_bytes, duration, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains information about the total amount of data that was used for calls
- Attributes:
- ID (
str):NetworkStatisticsEntryCall - Args:
- network_type (
telegram.api.types.NetworkType): - Type of the network the data was sent throughCall setNetworkType to maintain the actual network type
- sent_bytes (
int): - Total number of bytes sent
- received_bytes (
int): - Total number of bytes received
- duration (
float): - Total call duration, in seconds
- network_type (
- Returns:
- NetworkStatisticsEntry
- Raises:
telegram.Error
-
ID= 'networkStatisticsEntryCall'¶
-
static
read(q: dict, *args) → pytglib.api.types.network_statistics_entry_call.NetworkStatisticsEntryCall¶
pytglib.api.types.network_statistics_entry_file module¶
-
class
pytglib.api.types.network_statistics_entry_file.NetworkStatisticsEntryFile(file_type, network_type, sent_bytes, received_bytes, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains information about the total amount of data that was used to send and receive files
- Attributes:
- ID (
str):NetworkStatisticsEntryFile - Args:
- file_type (
telegram.api.types.FileType): - Type of the file the data is part of; pass null if the data isn’t related to files
- network_type (
telegram.api.types.NetworkType): - Type of the network the data was sent throughCall setNetworkType to maintain the actual network type
- sent_bytes (
int): - Total number of bytes sent
- received_bytes (
int): - Total number of bytes received
- file_type (
- Returns:
- NetworkStatisticsEntry
- Raises:
telegram.Error
-
ID= 'networkStatisticsEntryFile'¶
-
static
read(q: dict, *args) → pytglib.api.types.network_statistics_entry_file.NetworkStatisticsEntryFile¶
pytglib.api.types.network_type module¶
-
class
pytglib.api.types.network_type.NetworkType(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents the type of a network
No parameters required.
-
ID= 'networkType'¶
-
static
read(q: dict, *args) → NetworkTypeNone or NetworkTypeMobileRoaming or NetworkTypeOther or NetworkTypeMobile or NetworkTypeWiFi¶
-
pytglib.api.types.network_type_mobile module¶
-
class
pytglib.api.types.network_type_mobile.NetworkTypeMobile(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA mobile network
- Attributes:
- ID (
str):NetworkTypeMobile
No parameters required.
- Returns:
- NetworkType
- Raises:
telegram.Error
-
ID= 'networkTypeMobile'¶
-
static
read(q: dict, *args) → pytglib.api.types.network_type_mobile.NetworkTypeMobile¶
pytglib.api.types.network_type_mobile_roaming module¶
-
class
pytglib.api.types.network_type_mobile_roaming.NetworkTypeMobileRoaming(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA mobile roaming network
- Attributes:
- ID (
str):NetworkTypeMobileRoaming
No parameters required.
- Returns:
- NetworkType
- Raises:
telegram.Error
-
ID= 'networkTypeMobileRoaming'¶
-
static
read(q: dict, *args) → pytglib.api.types.network_type_mobile_roaming.NetworkTypeMobileRoaming¶
pytglib.api.types.network_type_none module¶
-
class
pytglib.api.types.network_type_none.NetworkTypeNone(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe network is not available
- Attributes:
- ID (
str):NetworkTypeNone
No parameters required.
- Returns:
- NetworkType
- Raises:
telegram.Error
-
ID= 'networkTypeNone'¶
-
static
read(q: dict, *args) → pytglib.api.types.network_type_none.NetworkTypeNone¶
pytglib.api.types.network_type_other module¶
-
class
pytglib.api.types.network_type_other.NetworkTypeOther(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA different network type (e.g., Ethernet network)
- Attributes:
- ID (
str):NetworkTypeOther
No parameters required.
- Returns:
- NetworkType
- Raises:
telegram.Error
-
ID= 'networkTypeOther'¶
-
static
read(q: dict, *args) → pytglib.api.types.network_type_other.NetworkTypeOther¶
pytglib.api.types.network_type_wi_fi module¶
-
class
pytglib.api.types.network_type_wi_fi.NetworkTypeWiFi(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA Wi-Fi network
- Attributes:
- ID (
str):NetworkTypeWiFi
No parameters required.
- Returns:
- NetworkType
- Raises:
telegram.Error
-
ID= 'networkTypeWiFi'¶
-
static
read(q: dict, *args) → pytglib.api.types.network_type_wi_fi.NetworkTypeWiFi¶
pytglib.api.types.notification module¶
-
class
pytglib.api.types.notification.Notification(id, date, is_silent, type, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains information about a notification
- Attributes:
- ID (
str):Notification - Args:
- id (
int): - Unique persistent identifier of this notification
- date (
int): - Notification date
- is_silent (
bool): - True, if the notification was explicitly sent without sound
- type (
telegram.api.types.NotificationType): - Notification type
- id (
- Returns:
- Notification
- Raises:
telegram.Error
-
ID= 'notification'¶
-
static
read(q: dict, *args) → pytglib.api.types.notification.Notification¶
pytglib.api.types.notification_group module¶
-
class
pytglib.api.types.notification_group.NotificationGroup(id, type, chat_id, total_count, notifications, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectDescribes a group of notifications
- Attributes:
- ID (
str):NotificationGroup - Args:
- id (
int): - Unique persistent auto-incremented from 1 identifier of the notification group
- type (
telegram.api.types.NotificationGroupType): - Type of the group
- chat_id (
int): - Identifier of a chat to which all notifications in the group belong
- total_count (
int): - Total number of active notifications in the group
- notifications (List of
telegram.api.types.notification): - The list of active notifications
- id (
- Returns:
- NotificationGroup
- Raises:
telegram.Error
-
ID= 'notificationGroup'¶
-
static
read(q: dict, *args) → pytglib.api.types.notification_group.NotificationGroup¶
pytglib.api.types.notification_group_type module¶
-
class
pytglib.api.types.notification_group_type.NotificationGroupType(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectDescribes the type of notifications in a notification group
No parameters required.
-
ID= 'notificationGroupType'¶
-
static
read(q: dict, *args) → NotificationGroupTypeMessages or NotificationGroupTypeMentions or NotificationGroupTypeCalls or NotificationGroupTypeSecretChat¶
-
pytglib.api.types.notification_group_type_calls module¶
-
class
pytglib.api.types.notification_group_type_calls.NotificationGroupTypeCalls(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA group containing notifications of type notificationTypeNewCall
- Attributes:
- ID (
str):NotificationGroupTypeCalls
No parameters required.
- Returns:
- NotificationGroupType
- Raises:
telegram.Error
-
ID= 'notificationGroupTypeCalls'¶
-
static
read(q: dict, *args) → pytglib.api.types.notification_group_type_calls.NotificationGroupTypeCalls¶
pytglib.api.types.notification_group_type_mentions module¶
-
class
pytglib.api.types.notification_group_type_mentions.NotificationGroupTypeMentions(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA group containing notifications of type notificationTypeNewMessage and notificationTypeNewPushMessage with unread mentions of the current user, replies to their messages, or a pinned message
- Attributes:
- ID (
str):NotificationGroupTypeMentions
No parameters required.
- Returns:
- NotificationGroupType
- Raises:
telegram.Error
-
ID= 'notificationGroupTypeMentions'¶
-
static
read(q: dict, *args) → pytglib.api.types.notification_group_type_mentions.NotificationGroupTypeMentions¶
pytglib.api.types.notification_group_type_messages module¶
-
class
pytglib.api.types.notification_group_type_messages.NotificationGroupTypeMessages(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA group containing notifications of type notificationTypeNewMessage and notificationTypeNewPushMessage with ordinary unread messages
- Attributes:
- ID (
str):NotificationGroupTypeMessages
No parameters required.
- Returns:
- NotificationGroupType
- Raises:
telegram.Error
-
ID= 'notificationGroupTypeMessages'¶
-
static
read(q: dict, *args) → pytglib.api.types.notification_group_type_messages.NotificationGroupTypeMessages¶
pytglib.api.types.notification_group_type_secret_chat module¶
-
class
pytglib.api.types.notification_group_type_secret_chat.NotificationGroupTypeSecretChat(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA group containing a notification of type notificationTypeNewSecretChat
- Attributes:
- ID (
str):NotificationGroupTypeSecretChat
No parameters required.
- Returns:
- NotificationGroupType
- Raises:
telegram.Error
-
ID= 'notificationGroupTypeSecretChat'¶
-
static
read(q: dict, *args) → pytglib.api.types.notification_group_type_secret_chat.NotificationGroupTypeSecretChat¶
pytglib.api.types.notification_settings_scope module¶
-
class
pytglib.api.types.notification_settings_scope.NotificationSettingsScope(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectDescribes the types of chats to which notification settings are relevant
No parameters required.
-
ID= 'notificationSettingsScope'¶
-
static
read(q: dict, *args) → NotificationSettingsScopePrivateChats or NotificationSettingsScopeChannelChats or NotificationSettingsScopeGroupChats¶
-
pytglib.api.types.notification_settings_scope_channel_chats module¶
-
class
pytglib.api.types.notification_settings_scope_channel_chats.NotificationSettingsScopeChannelChats(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectNotification settings applied to all channel chats when the corresponding chat setting has a default value
- Attributes:
- ID (
str):NotificationSettingsScopeChannelChats
No parameters required.
- Returns:
- NotificationSettingsScope
- Raises:
telegram.Error
-
ID= 'notificationSettingsScopeChannelChats'¶
-
static
read(q: dict, *args) → pytglib.api.types.notification_settings_scope_channel_chats.NotificationSettingsScopeChannelChats¶
pytglib.api.types.notification_settings_scope_group_chats module¶
-
class
pytglib.api.types.notification_settings_scope_group_chats.NotificationSettingsScopeGroupChats(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectNotification settings applied to all basic group and supergroup chats when the corresponding chat setting has a default value
- Attributes:
- ID (
str):NotificationSettingsScopeGroupChats
No parameters required.
- Returns:
- NotificationSettingsScope
- Raises:
telegram.Error
-
ID= 'notificationSettingsScopeGroupChats'¶
-
static
read(q: dict, *args) → pytglib.api.types.notification_settings_scope_group_chats.NotificationSettingsScopeGroupChats¶
pytglib.api.types.notification_settings_scope_private_chats module¶
-
class
pytglib.api.types.notification_settings_scope_private_chats.NotificationSettingsScopePrivateChats(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectNotification settings applied to all private and secret chats when the corresponding chat setting has a default value
- Attributes:
- ID (
str):NotificationSettingsScopePrivateChats
No parameters required.
- Returns:
- NotificationSettingsScope
- Raises:
telegram.Error
-
ID= 'notificationSettingsScopePrivateChats'¶
-
static
read(q: dict, *args) → pytglib.api.types.notification_settings_scope_private_chats.NotificationSettingsScopePrivateChats¶
pytglib.api.types.notification_type module¶
-
class
pytglib.api.types.notification_type.NotificationType(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains detailed information about a notification
No parameters required.
-
ID= 'notificationType'¶
-
static
read(q: dict, *args) → NotificationTypeNewPushMessage or NotificationTypeNewMessage or NotificationTypeNewCall or NotificationTypeNewSecretChat¶
-
pytglib.api.types.notification_type_new_call module¶
-
class
pytglib.api.types.notification_type_new_call.NotificationTypeNewCall(call_id, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectNew call was received
- Attributes:
- ID (
str):NotificationTypeNewCall - Args:
- call_id (
int): - Call identifier
- call_id (
- Returns:
- NotificationType
- Raises:
telegram.Error
-
ID= 'notificationTypeNewCall'¶
-
static
read(q: dict, *args) → pytglib.api.types.notification_type_new_call.NotificationTypeNewCall¶
pytglib.api.types.notification_type_new_message module¶
-
class
pytglib.api.types.notification_type_new_message.NotificationTypeNewMessage(message, show_preview, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectNew message was received
- Attributes:
- ID (
str):NotificationTypeNewMessage - Args:
- message (
telegram.api.types.message): - The message
- show_preview (
bool): - True, if message content must be displayed in notifications
- message (
- Returns:
- NotificationType
- Raises:
telegram.Error
-
ID= 'notificationTypeNewMessage'¶
-
static
read(q: dict, *args) → pytglib.api.types.notification_type_new_message.NotificationTypeNewMessage¶
pytglib.api.types.notification_type_new_push_message module¶
-
class
pytglib.api.types.notification_type_new_push_message.NotificationTypeNewPushMessage(message_id, sender_id, sender_name, is_outgoing, content, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectNew message was received through a push notification
- Attributes:
- ID (
str):NotificationTypeNewPushMessage - Args:
- message_id (
int): - The message identifierThe message will not be available in the chat history, but the ID can be used in viewMessages, or as reply_to_message_id
- sender_id (
telegram.api.types.MessageSender): - Identifier of the sender of the messageCorresponding user or chat may be inaccessible
- sender_name (
str): - Name of the sender
- is_outgoing (
bool): - True, if the message is outgoing
- content (
telegram.api.types.PushMessageContent): - Push message content
- message_id (
- Returns:
- NotificationType
- Raises:
telegram.Error
-
ID= 'notificationTypeNewPushMessage'¶
-
static
read(q: dict, *args) → pytglib.api.types.notification_type_new_push_message.NotificationTypeNewPushMessage¶
pytglib.api.types.notification_type_new_secret_chat module¶
-
class
pytglib.api.types.notification_type_new_secret_chat.NotificationTypeNewSecretChat(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectNew secret chat was created
- Attributes:
- ID (
str):NotificationTypeNewSecretChat
No parameters required.
- Returns:
- NotificationType
- Raises:
telegram.Error
-
ID= 'notificationTypeNewSecretChat'¶
-
static
read(q: dict, *args) → pytglib.api.types.notification_type_new_secret_chat.NotificationTypeNewSecretChat¶
pytglib.api.types.ok module¶
-
class
pytglib.api.types.ok.Ok(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectAn object of this type is returned on a successful function call for certain functions
- Attributes:
- ID (
str):Ok
No parameters required.
- Returns:
- Ok
- Raises:
telegram.Error
-
ID= 'ok'¶
-
static
read(q: dict, *args) → pytglib.api.types.ok.Ok¶
pytglib.api.types.option_value module¶
-
class
pytglib.api.types.option_value.OptionValue(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents the value of an option
No parameters required.
-
ID= 'optionValue'¶
-
static
read(q: dict, *args) → OptionValueEmpty or OptionValueString or OptionValueInteger or OptionValueBoolean¶
-
pytglib.api.types.option_value_boolean module¶
-
class
pytglib.api.types.option_value_boolean.OptionValueBoolean(value, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents a boolean option
- Attributes:
- ID (
str):OptionValueBoolean - Args:
- value (
bool): - The value of the option
- value (
- Returns:
- OptionValue
- Raises:
telegram.Error
-
ID= 'optionValueBoolean'¶
-
static
read(q: dict, *args) → pytglib.api.types.option_value_boolean.OptionValueBoolean¶
pytglib.api.types.option_value_empty module¶
-
class
pytglib.api.types.option_value_empty.OptionValueEmpty(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents an unknown option or an option which has a default value
- Attributes:
- ID (
str):OptionValueEmpty
No parameters required.
- Returns:
- OptionValue
- Raises:
telegram.Error
-
ID= 'optionValueEmpty'¶
-
static
read(q: dict, *args) → pytglib.api.types.option_value_empty.OptionValueEmpty¶
pytglib.api.types.option_value_integer module¶
-
class
pytglib.api.types.option_value_integer.OptionValueInteger(value, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents an integer option
- Attributes:
- ID (
str):OptionValueInteger - Args:
- value (
int): - The value of the option
- value (
- Returns:
- OptionValue
- Raises:
telegram.Error
-
ID= 'optionValueInteger'¶
-
static
read(q: dict, *args) → pytglib.api.types.option_value_integer.OptionValueInteger¶
pytglib.api.types.option_value_string module¶
-
class
pytglib.api.types.option_value_string.OptionValueString(value, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents a string option
- Attributes:
- ID (
str):OptionValueString - Args:
- value (
str): - The value of the option
- value (
- Returns:
- OptionValue
- Raises:
telegram.Error
-
ID= 'optionValueString'¶
-
static
read(q: dict, *args) → pytglib.api.types.option_value_string.OptionValueString¶
pytglib.api.types.order_info module¶
-
class
pytglib.api.types.order_info.OrderInfo(name, phone_number, email_address, shipping_address, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectOrder information
- Attributes:
- ID (
str):OrderInfo - Args:
- name (
str): - Name of the user
- phone_number (
str): - Phone number of the user
- email_address (
str): - Email address of the user
- shipping_address (
telegram.api.types.address): - Shipping address for this order; may be null
- name (
- Returns:
- OrderInfo
- Raises:
telegram.Error
-
ID= 'orderInfo'¶
-
static
read(q: dict, *args) → pytglib.api.types.order_info.OrderInfo¶
pytglib.api.types.page_block module¶
-
class
pytglib.api.types.page_block.PageBlock(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectDescribes a block of an instant view web page
No parameters required.
-
ID= 'pageBlock'¶
-
static
read(q: dict, *args) → PageBlockAuthorDate or PageBlockTable or PageBlockCollage or PageBlockParagraph or PageBlockPullQuote or PageBlockRelatedArticles or PageBlockSubheader or PageBlockBlockQuote or PageBlockAnchor or PageBlockVoiceNote or PageBlockAnimation or PageBlockTitle or PageBlockSlideshow or PageBlockMap or PageBlockPhoto or PageBlockVideo or PageBlockChatLink or PageBlockEmbedded or PageBlockFooter or PageBlockSubtitle or PageBlockHeader or PageBlockAudio or PageBlockDivider or PageBlockCover or PageBlockDetails or PageBlockList or PageBlockKicker or PageBlockPreformatted or PageBlockEmbeddedPost¶
-
pytglib.api.types.page_block_anchor module¶
-
class
pytglib.api.types.page_block_anchor.PageBlockAnchor(name, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectAn invisible anchor on a page, which can be used in a URL to open the page from the specified anchor
- Attributes:
- ID (
str):PageBlockAnchor - Args:
- name (
str): - Name of the anchor
- name (
- Returns:
- PageBlock
- Raises:
telegram.Error
-
ID= 'pageBlockAnchor'¶
-
static
read(q: dict, *args) → pytglib.api.types.page_block_anchor.PageBlockAnchor¶
pytglib.api.types.page_block_animation module¶
-
class
pytglib.api.types.page_block_animation.PageBlockAnimation(animation, caption, need_autoplay, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectAn animation
- Attributes:
- ID (
str):PageBlockAnimation - Args:
- animation (
telegram.api.types.animation): - Animation file; may be null
- caption (
telegram.api.types.pageBlockCaption): - Animation caption
- need_autoplay (
bool): - True, if the animation must be played automatically
- animation (
- Returns:
- PageBlock
- Raises:
telegram.Error
-
ID= 'pageBlockAnimation'¶
-
static
read(q: dict, *args) → pytglib.api.types.page_block_animation.PageBlockAnimation¶
pytglib.api.types.page_block_audio module¶
-
class
pytglib.api.types.page_block_audio.PageBlockAudio(audio, caption, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectAn audio file
- Attributes:
- ID (
str):PageBlockAudio - Args:
- audio (
telegram.api.types.audio): - Audio file; may be null
- caption (
telegram.api.types.pageBlockCaption): - Audio file caption
- audio (
- Returns:
- PageBlock
- Raises:
telegram.Error
-
ID= 'pageBlockAudio'¶
-
static
read(q: dict, *args) → pytglib.api.types.page_block_audio.PageBlockAudio¶
pytglib.api.types.page_block_author_date module¶
Bases:
pytglib.api.utils.object.ObjectThe author and publishing date of a page
- Attributes:
- ID (
str):PageBlockAuthorDate - Args:
- author (
telegram.api.types.RichText): - Author
- publish_date (
int): - Point in time (Unix timestamp) when the article was published; 0 if unknown
- author (
- Returns:
- PageBlock
- Raises:
telegram.Error
pytglib.api.types.page_block_block_quote module¶
-
class
pytglib.api.types.page_block_block_quote.PageBlockBlockQuote(text, credit, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA block quote
- Attributes:
- ID (
str):PageBlockBlockQuote - Args:
- text (
telegram.api.types.RichText): - Quote text
- credit (
telegram.api.types.RichText): - Quote credit
- text (
- Returns:
- PageBlock
- Raises:
telegram.Error
-
ID= 'pageBlockBlockQuote'¶
-
static
read(q: dict, *args) → pytglib.api.types.page_block_block_quote.PageBlockBlockQuote¶
pytglib.api.types.page_block_caption module¶
-
class
pytglib.api.types.page_block_caption.PageBlockCaption(text, credit, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains a caption of an instant view web page block, consisting of a text and a trailing credit
- Attributes:
- ID (
str):PageBlockCaption - Args:
- text (
telegram.api.types.RichText): - Content of the caption
- credit (
telegram.api.types.RichText): - Block credit (like HTML tag <cite>)
- text (
- Returns:
- PageBlockCaption
- Raises:
telegram.Error
-
ID= 'pageBlockCaption'¶
-
static
read(q: dict, *args) → pytglib.api.types.page_block_caption.PageBlockCaption¶
pytglib.api.types.page_block_chat_link module¶
-
class
pytglib.api.types.page_block_chat_link.PageBlockChatLink(title, photo, username, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA link to a chat
- Attributes:
- ID (
str):PageBlockChatLink - Args:
- title (
str): - Chat title
- photo (
telegram.api.types.chatPhotoInfo): - Chat photo; may be null
- username (
str): - Chat username by which all other information about the chat can be resolved
- title (
- Returns:
- PageBlock
- Raises:
telegram.Error
-
ID= 'pageBlockChatLink'¶
-
static
read(q: dict, *args) → pytglib.api.types.page_block_chat_link.PageBlockChatLink¶
pytglib.api.types.page_block_collage module¶
-
class
pytglib.api.types.page_block_collage.PageBlockCollage(page_blocks, caption, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA collage
- Attributes:
- ID (
str):PageBlockCollage - Args:
- page_blocks (List of
telegram.api.types.PageBlock): - Collage item contents
- caption (
telegram.api.types.pageBlockCaption): - Block caption
- page_blocks (List of
- Returns:
- PageBlock
- Raises:
telegram.Error
-
ID= 'pageBlockCollage'¶
-
static
read(q: dict, *args) → pytglib.api.types.page_block_collage.PageBlockCollage¶
pytglib.api.types.page_block_cover module¶
-
class
pytglib.api.types.page_block_cover.PageBlockCover(cover, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA page cover
- Attributes:
- ID (
str):PageBlockCover - Args:
- cover (
telegram.api.types.PageBlock): - Cover
- cover (
- Returns:
- PageBlock
- Raises:
telegram.Error
-
ID= 'pageBlockCover'¶
-
static
read(q: dict, *args) → pytglib.api.types.page_block_cover.PageBlockCover¶
pytglib.api.types.page_block_details module¶
-
class
pytglib.api.types.page_block_details.PageBlockDetails(header, page_blocks, is_open, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA collapsible block
- Attributes:
- ID (
str):PageBlockDetails - Args:
- header (
telegram.api.types.RichText): - Always visible heading for the block
- page_blocks (List of
telegram.api.types.PageBlock): - Block contents
- is_open (
bool): - True, if the block is open by default
- header (
- Returns:
- PageBlock
- Raises:
telegram.Error
-
ID= 'pageBlockDetails'¶
-
static
read(q: dict, *args) → pytglib.api.types.page_block_details.PageBlockDetails¶
pytglib.api.types.page_block_divider module¶
-
class
pytglib.api.types.page_block_divider.PageBlockDivider(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectAn empty block separating a page
- Attributes:
- ID (
str):PageBlockDivider
No parameters required.
- Returns:
- PageBlock
- Raises:
telegram.Error
-
ID= 'pageBlockDivider'¶
-
static
read(q: dict, *args) → pytglib.api.types.page_block_divider.PageBlockDivider¶
pytglib.api.types.page_block_embedded module¶
-
class
pytglib.api.types.page_block_embedded.PageBlockEmbedded(url, html, poster_photo, width, height, caption, is_full_width, allow_scrolling, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectAn embedded web page
- Attributes:
- ID (
str):PageBlockEmbedded - Args:
- url (
str): - Web page URL, if available
- html (
str): - HTML-markup of the embedded page
- poster_photo (
telegram.api.types.photo): - Poster photo, if available; may be null
- width (
int): - Block width; 0 if unknown
- height (
int): - Block height; 0 if unknown
- caption (
telegram.api.types.pageBlockCaption): - Block caption
- is_full_width (
bool): - True, if the block must be full width
- allow_scrolling (
bool): - True, if scrolling needs to be allowed
- url (
- Returns:
- PageBlock
- Raises:
telegram.Error
-
ID= 'pageBlockEmbedded'¶
-
static
read(q: dict, *args) → pytglib.api.types.page_block_embedded.PageBlockEmbedded¶
pytglib.api.types.page_block_embedded_post module¶
-
class
pytglib.api.types.page_block_embedded_post.PageBlockEmbeddedPost(url, author, author_photo, date, page_blocks, caption, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectAn embedded post
- Attributes:
- ID (
str):PageBlockEmbeddedPost - Args:
- url (
str): - Web page URL
- author (
str): - Post author
- author_photo (
telegram.api.types.photo): - Post author photo; may be null
- date (
int): - Point in time (Unix timestamp) when the post was created; 0 if unknown
- page_blocks (List of
telegram.api.types.PageBlock): - Post content
- caption (
telegram.api.types.pageBlockCaption): - Post caption
- url (
- Returns:
- PageBlock
- Raises:
telegram.Error
-
ID= 'pageBlockEmbeddedPost'¶
-
static
read(q: dict, *args) → pytglib.api.types.page_block_embedded_post.PageBlockEmbeddedPost¶
pytglib.api.types.page_block_header module¶
-
class
pytglib.api.types.page_block_header.PageBlockHeader(header, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA header
- Attributes:
- ID (
str):PageBlockHeader - Args:
- header (
telegram.api.types.RichText): - Header
- header (
- Returns:
- PageBlock
- Raises:
telegram.Error
-
ID= 'pageBlockHeader'¶
-
static
read(q: dict, *args) → pytglib.api.types.page_block_header.PageBlockHeader¶
pytglib.api.types.page_block_horizontal_alignment module¶
-
class
pytglib.api.types.page_block_horizontal_alignment.PageBlockHorizontalAlignment(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectDescribes a horizontal alignment of a table cell content
No parameters required.
-
ID= 'pageBlockHorizontalAlignment'¶
-
static
read(q: dict, *args) → PageBlockHorizontalAlignmentCenter or PageBlockHorizontalAlignmentRight or PageBlockHorizontalAlignmentLeft¶
-
pytglib.api.types.page_block_horizontal_alignment_center module¶
-
class
pytglib.api.types.page_block_horizontal_alignment_center.PageBlockHorizontalAlignmentCenter(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe content must be center-aligned
- Attributes:
- ID (
str):PageBlockHorizontalAlignmentCenter
No parameters required.
- Returns:
- PageBlockHorizontalAlignment
- Raises:
telegram.Error
-
ID= 'pageBlockHorizontalAlignmentCenter'¶
-
static
read(q: dict, *args) → pytglib.api.types.page_block_horizontal_alignment_center.PageBlockHorizontalAlignmentCenter¶
pytglib.api.types.page_block_horizontal_alignment_left module¶
-
class
pytglib.api.types.page_block_horizontal_alignment_left.PageBlockHorizontalAlignmentLeft(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe content must be left-aligned
- Attributes:
- ID (
str):PageBlockHorizontalAlignmentLeft
No parameters required.
- Returns:
- PageBlockHorizontalAlignment
- Raises:
telegram.Error
-
ID= 'pageBlockHorizontalAlignmentLeft'¶
-
static
read(q: dict, *args) → pytglib.api.types.page_block_horizontal_alignment_left.PageBlockHorizontalAlignmentLeft¶
pytglib.api.types.page_block_horizontal_alignment_right module¶
-
class
pytglib.api.types.page_block_horizontal_alignment_right.PageBlockHorizontalAlignmentRight(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe content must be right-aligned
- Attributes:
- ID (
str):PageBlockHorizontalAlignmentRight
No parameters required.
- Returns:
- PageBlockHorizontalAlignment
- Raises:
telegram.Error
-
ID= 'pageBlockHorizontalAlignmentRight'¶
-
static
read(q: dict, *args) → pytglib.api.types.page_block_horizontal_alignment_right.PageBlockHorizontalAlignmentRight¶
pytglib.api.types.page_block_kicker module¶
-
class
pytglib.api.types.page_block_kicker.PageBlockKicker(kicker, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA kicker
- Attributes:
- ID (
str):PageBlockKicker - Args:
- kicker (
telegram.api.types.RichText): - Kicker
- kicker (
- Returns:
- PageBlock
- Raises:
telegram.Error
-
ID= 'pageBlockKicker'¶
-
static
read(q: dict, *args) → pytglib.api.types.page_block_kicker.PageBlockKicker¶
pytglib.api.types.page_block_list module¶
-
class
pytglib.api.types.page_block_list.PageBlockList(items, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA list of data blocks
- Attributes:
- ID (
str):PageBlockList - Args:
- items (List of
telegram.api.types.pageBlockListItem): - The items of the list
- items (List of
- Returns:
- PageBlock
- Raises:
telegram.Error
-
ID= 'pageBlockList'¶
-
static
read(q: dict, *args) → pytglib.api.types.page_block_list.PageBlockList¶
pytglib.api.types.page_block_list_item module¶
-
class
pytglib.api.types.page_block_list_item.PageBlockListItem(label, page_blocks, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectDescribes an item of a list page block
- Attributes:
- ID (
str):PageBlockListItem - Args:
- label (
str): - Item label
- page_blocks (List of
telegram.api.types.PageBlock): - Item blocks
- label (
- Returns:
- PageBlockListItem
- Raises:
telegram.Error
-
ID= 'pageBlockListItem'¶
-
static
read(q: dict, *args) → pytglib.api.types.page_block_list_item.PageBlockListItem¶
pytglib.api.types.page_block_map module¶
-
class
pytglib.api.types.page_block_map.PageBlockMap(location, zoom, width, height, caption, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA map
- Attributes:
- ID (
str):PageBlockMap - Args:
- location (
telegram.api.types.location): - Location of the map center
- zoom (
int): - Map zoom level
- width (
int): - Map width
- height (
int): - Map height
- caption (
telegram.api.types.pageBlockCaption): - Block caption
- location (
- Returns:
- PageBlock
- Raises:
telegram.Error
-
ID= 'pageBlockMap'¶
-
static
read(q: dict, *args) → pytglib.api.types.page_block_map.PageBlockMap¶
pytglib.api.types.page_block_paragraph module¶
-
class
pytglib.api.types.page_block_paragraph.PageBlockParagraph(text, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA text paragraph
- Attributes:
- ID (
str):PageBlockParagraph - Args:
- text (
telegram.api.types.RichText): - Paragraph text
- text (
- Returns:
- PageBlock
- Raises:
telegram.Error
-
ID= 'pageBlockParagraph'¶
-
static
read(q: dict, *args) → pytglib.api.types.page_block_paragraph.PageBlockParagraph¶
pytglib.api.types.page_block_photo module¶
-
class
pytglib.api.types.page_block_photo.PageBlockPhoto(photo, caption, url, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA photo
- Attributes:
- ID (
str):PageBlockPhoto - Args:
- photo (
telegram.api.types.photo): - Photo file; may be null
- caption (
telegram.api.types.pageBlockCaption): - Photo caption
- url (
str): - URL that needs to be opened when the photo is clicked
- photo (
- Returns:
- PageBlock
- Raises:
telegram.Error
-
ID= 'pageBlockPhoto'¶
-
static
read(q: dict, *args) → pytglib.api.types.page_block_photo.PageBlockPhoto¶
pytglib.api.types.page_block_preformatted module¶
-
class
pytglib.api.types.page_block_preformatted.PageBlockPreformatted(text, language, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA preformatted text paragraph
- Attributes:
- ID (
str):PageBlockPreformatted - Args:
- text (
telegram.api.types.RichText): - Paragraph text
- language (
str): - Programming language for which the text needs to be formatted
- text (
- Returns:
- PageBlock
- Raises:
telegram.Error
-
ID= 'pageBlockPreformatted'¶
-
static
read(q: dict, *args) → pytglib.api.types.page_block_preformatted.PageBlockPreformatted¶
pytglib.api.types.page_block_pull_quote module¶
-
class
pytglib.api.types.page_block_pull_quote.PageBlockPullQuote(text, credit, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA pull quote
- Attributes:
- ID (
str):PageBlockPullQuote - Args:
- text (
telegram.api.types.RichText): - Quote text
- credit (
telegram.api.types.RichText): - Quote credit
- text (
- Returns:
- PageBlock
- Raises:
telegram.Error
-
ID= 'pageBlockPullQuote'¶
-
static
read(q: dict, *args) → pytglib.api.types.page_block_pull_quote.PageBlockPullQuote¶
pytglib.api.types.page_block_slideshow module¶
-
class
pytglib.api.types.page_block_slideshow.PageBlockSlideshow(page_blocks, caption, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA slideshow
- Attributes:
- ID (
str):PageBlockSlideshow - Args:
- page_blocks (List of
telegram.api.types.PageBlock): - Slideshow item contents
- caption (
telegram.api.types.pageBlockCaption): - Block caption
- page_blocks (List of
- Returns:
- PageBlock
- Raises:
telegram.Error
-
ID= 'pageBlockSlideshow'¶
-
static
read(q: dict, *args) → pytglib.api.types.page_block_slideshow.PageBlockSlideshow¶
pytglib.api.types.page_block_subheader module¶
-
class
pytglib.api.types.page_block_subheader.PageBlockSubheader(subheader, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA subheader
- Attributes:
- ID (
str):PageBlockSubheader - Args:
- subheader (
telegram.api.types.RichText): - Subheader
- subheader (
- Returns:
- PageBlock
- Raises:
telegram.Error
-
ID= 'pageBlockSubheader'¶
-
static
read(q: dict, *args) → pytglib.api.types.page_block_subheader.PageBlockSubheader¶
pytglib.api.types.page_block_subtitle module¶
-
class
pytglib.api.types.page_block_subtitle.PageBlockSubtitle(subtitle, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe subtitle of a page
- Attributes:
- ID (
str):PageBlockSubtitle - Args:
- subtitle (
telegram.api.types.RichText): - Subtitle
- subtitle (
- Returns:
- PageBlock
- Raises:
telegram.Error
-
ID= 'pageBlockSubtitle'¶
-
static
read(q: dict, *args) → pytglib.api.types.page_block_subtitle.PageBlockSubtitle¶
pytglib.api.types.page_block_table module¶
-
class
pytglib.api.types.page_block_table.PageBlockTable(caption, cells, is_bordered, is_striped, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA table
- Attributes:
- ID (
str):PageBlockTable - Args:
- caption (
telegram.api.types.RichText): - Table caption
- cells (List of List of
telegram.api.types.pageBlockTableCell): - Table cells
- is_bordered (
bool): - True, if the table is bordered
- is_striped (
bool): - True, if the table is striped
- caption (
- Returns:
- PageBlock
- Raises:
telegram.Error
-
ID= 'pageBlockTable'¶
-
static
read(q: dict, *args) → pytglib.api.types.page_block_table.PageBlockTable¶
pytglib.api.types.page_block_table_cell module¶
-
class
pytglib.api.types.page_block_table_cell.PageBlockTableCell(text, is_header, colspan, rowspan, align, valign, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents a cell of a table
- Attributes:
- ID (
str):PageBlockTableCell - Args:
- text (
telegram.api.types.RichText): - Cell text; may be nullIf the text is null, then the cell must be invisible
- is_header (
bool): - True, if it is a header cell
- colspan (
int): - The number of columns the cell spans
- rowspan (
int): - The number of rows the cell spans
- align (
telegram.api.types.PageBlockHorizontalAlignment): - Horizontal cell content alignment
- valign (
telegram.api.types.PageBlockVerticalAlignment): - Vertical cell content alignment
- text (
- Returns:
- PageBlockTableCell
- Raises:
telegram.Error
-
ID= 'pageBlockTableCell'¶
-
static
read(q: dict, *args) → pytglib.api.types.page_block_table_cell.PageBlockTableCell¶
pytglib.api.types.page_block_title module¶
-
class
pytglib.api.types.page_block_title.PageBlockTitle(title, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe title of a page
- Attributes:
- ID (
str):PageBlockTitle - Args:
- title (
telegram.api.types.RichText): - Title
- title (
- Returns:
- PageBlock
- Raises:
telegram.Error
-
ID= 'pageBlockTitle'¶
-
static
read(q: dict, *args) → pytglib.api.types.page_block_title.PageBlockTitle¶
pytglib.api.types.page_block_vertical_alignment module¶
-
class
pytglib.api.types.page_block_vertical_alignment.PageBlockVerticalAlignment(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectDescribes a Vertical alignment of a table cell content
No parameters required.
-
ID= 'pageBlockVerticalAlignment'¶
-
static
read(q: dict, *args) → PageBlockVerticalAlignmentBottom or PageBlockVerticalAlignmentTop or PageBlockVerticalAlignmentMiddle¶
-
pytglib.api.types.page_block_vertical_alignment_bottom module¶
-
class
pytglib.api.types.page_block_vertical_alignment_bottom.PageBlockVerticalAlignmentBottom(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe content must be bottom-aligned
- Attributes:
- ID (
str):PageBlockVerticalAlignmentBottom
No parameters required.
- Returns:
- PageBlockVerticalAlignment
- Raises:
telegram.Error
-
ID= 'pageBlockVerticalAlignmentBottom'¶
-
static
read(q: dict, *args) → pytglib.api.types.page_block_vertical_alignment_bottom.PageBlockVerticalAlignmentBottom¶
pytglib.api.types.page_block_vertical_alignment_middle module¶
-
class
pytglib.api.types.page_block_vertical_alignment_middle.PageBlockVerticalAlignmentMiddle(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe content must be middle-aligned
- Attributes:
- ID (
str):PageBlockVerticalAlignmentMiddle
No parameters required.
- Returns:
- PageBlockVerticalAlignment
- Raises:
telegram.Error
-
ID= 'pageBlockVerticalAlignmentMiddle'¶
-
static
read(q: dict, *args) → pytglib.api.types.page_block_vertical_alignment_middle.PageBlockVerticalAlignmentMiddle¶
pytglib.api.types.page_block_vertical_alignment_top module¶
-
class
pytglib.api.types.page_block_vertical_alignment_top.PageBlockVerticalAlignmentTop(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe content must be top-aligned
- Attributes:
- ID (
str):PageBlockVerticalAlignmentTop
No parameters required.
- Returns:
- PageBlockVerticalAlignment
- Raises:
telegram.Error
-
ID= 'pageBlockVerticalAlignmentTop'¶
-
static
read(q: dict, *args) → pytglib.api.types.page_block_vertical_alignment_top.PageBlockVerticalAlignmentTop¶
pytglib.api.types.page_block_video module¶
-
class
pytglib.api.types.page_block_video.PageBlockVideo(video, caption, need_autoplay, is_looped, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA video
- Attributes:
- ID (
str):PageBlockVideo - Args:
- video (
telegram.api.types.video): - Video file; may be null
- caption (
telegram.api.types.pageBlockCaption): - Video caption
- need_autoplay (
bool): - True, if the video must be played automatically
- is_looped (
bool): - True, if the video must be looped
- video (
- Returns:
- PageBlock
- Raises:
telegram.Error
-
ID= 'pageBlockVideo'¶
-
static
read(q: dict, *args) → pytglib.api.types.page_block_video.PageBlockVideo¶
pytglib.api.types.page_block_voice_note module¶
-
class
pytglib.api.types.page_block_voice_note.PageBlockVoiceNote(voice_note, caption, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA voice note
- Attributes:
- ID (
str):PageBlockVoiceNote - Args:
- voice_note (
telegram.api.types.voiceNote): - Voice note; may be null
- caption (
telegram.api.types.pageBlockCaption): - Voice note caption
- voice_note (
- Returns:
- PageBlock
- Raises:
telegram.Error
-
ID= 'pageBlockVoiceNote'¶
-
static
read(q: dict, *args) → pytglib.api.types.page_block_voice_note.PageBlockVoiceNote¶
pytglib.api.types.passport_authorization_form module¶
Bases:
pytglib.api.utils.object.ObjectContains information about a Telegram Passport authorization form that was requested
- Attributes:
- ID (
str):PassportAuthorizationForm - Args:
- id (
int): - Unique identifier of the authorization form
- required_elements (List of
telegram.api.types.passportRequiredElement): - Telegram Passport elements that must be provided to complete the form
- privacy_policy_url (
str): - URL for the privacy policy of the service; may be empty
- id (
- Returns:
- PassportAuthorizationForm
- Raises:
telegram.Error
pytglib.api.types.passport_element module¶
-
class
pytglib.api.types.passport_element.PassportElement(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains information about a Telegram Passport element
No parameters required.
-
ID= 'passportElement'¶
-
static
read(q: dict, *args) → PassportElementAddress or PassportElementIdentityCard or PassportElementBankStatement or PassportElementTemporaryRegistration or PassportElementPassport or PassportElementEmailAddress or PassportElementInternalPassport or PassportElementUtilityBill or PassportElementDriverLicense or PassportElementPassportRegistration or PassportElementPhoneNumber or PassportElementRentalAgreement or PassportElementPersonalDetails¶
-
pytglib.api.types.passport_element_address module¶
-
class
pytglib.api.types.passport_element_address.PassportElementAddress(address, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA Telegram Passport element containing the user’s address
- Attributes:
- ID (
str):PassportElementAddress - Args:
- address (
telegram.api.types.address): - Address
- address (
- Returns:
- PassportElement
- Raises:
telegram.Error
-
ID= 'passportElementAddress'¶
-
static
read(q: dict, *args) → pytglib.api.types.passport_element_address.PassportElementAddress¶
pytglib.api.types.passport_element_bank_statement module¶
-
class
pytglib.api.types.passport_element_bank_statement.PassportElementBankStatement(bank_statement, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA Telegram Passport element containing the user’s bank statement
- Attributes:
- ID (
str):PassportElementBankStatement - Args:
- bank_statement (
telegram.api.types.personalDocument): - Bank statement
- bank_statement (
- Returns:
- PassportElement
- Raises:
telegram.Error
-
ID= 'passportElementBankStatement'¶
-
static
read(q: dict, *args) → pytglib.api.types.passport_element_bank_statement.PassportElementBankStatement¶
pytglib.api.types.passport_element_driver_license module¶
-
class
pytglib.api.types.passport_element_driver_license.PassportElementDriverLicense(driver_license, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA Telegram Passport element containing the user’s driver license
- Attributes:
- ID (
str):PassportElementDriverLicense - Args:
- driver_license (
telegram.api.types.identityDocument): - Driver license
- driver_license (
- Returns:
- PassportElement
- Raises:
telegram.Error
-
ID= 'passportElementDriverLicense'¶
-
static
read(q: dict, *args) → pytglib.api.types.passport_element_driver_license.PassportElementDriverLicense¶
pytglib.api.types.passport_element_email_address module¶
-
class
pytglib.api.types.passport_element_email_address.PassportElementEmailAddress(email_address, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA Telegram Passport element containing the user’s email address
- Attributes:
- ID (
str):PassportElementEmailAddress - Args:
- email_address (
str): - Email address
- email_address (
- Returns:
- PassportElement
- Raises:
telegram.Error
-
ID= 'passportElementEmailAddress'¶
-
static
read(q: dict, *args) → pytglib.api.types.passport_element_email_address.PassportElementEmailAddress¶
pytglib.api.types.passport_element_error module¶
-
class
pytglib.api.types.passport_element_error.PassportElementError(type, message, source, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains the description of an error in a Telegram Passport element
- Attributes:
- ID (
str):PassportElementError - Args:
- type (
telegram.api.types.PassportElementType): - Type of the Telegram Passport element which has the error
- message (
str): - Error message
- source (
telegram.api.types.PassportElementErrorSource): - Error source
- type (
- Returns:
- PassportElementError
- Raises:
telegram.Error
-
ID= 'passportElementError'¶
-
static
read(q: dict, *args) → pytglib.api.types.passport_element_error.PassportElementError¶
pytglib.api.types.passport_element_error_source module¶
-
class
pytglib.api.types.passport_element_error_source.PassportElementErrorSource(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains the description of an error in a Telegram Passport element
No parameters required.
-
ID= 'passportElementErrorSource'¶
-
static
read(q: dict, *args) → PassportElementErrorSourceSelfie or PassportElementErrorSourceReverseSide or PassportElementErrorSourceTranslationFile or PassportElementErrorSourceUnspecified or PassportElementErrorSourceFile or PassportElementErrorSourceTranslationFiles or PassportElementErrorSourceDataField or PassportElementErrorSourceFrontSide or PassportElementErrorSourceFiles¶
-
pytglib.api.types.passport_element_error_source_data_field module¶
-
class
pytglib.api.types.passport_element_error_source_data_field.PassportElementErrorSourceDataField(field_name, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectOne of the data fields contains an error. The error will be considered resolved when the value of the field changes
- Attributes:
- ID (
str):PassportElementErrorSourceDataField - Args:
- field_name (
str): - Field name
- field_name (
- Returns:
- PassportElementErrorSource
- Raises:
telegram.Error
-
ID= 'passportElementErrorSourceDataField'¶
-
static
read(q: dict, *args) → pytglib.api.types.passport_element_error_source_data_field.PassportElementErrorSourceDataField¶
pytglib.api.types.passport_element_error_source_file module¶
-
class
pytglib.api.types.passport_element_error_source_file.PassportElementErrorSourceFile(file_index, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe file contains an error. The error will be considered resolved when the file changes
- Attributes:
- ID (
str):PassportElementErrorSourceFile - Args:
- file_index (
int): - Index of a file with the error
- file_index (
- Returns:
- PassportElementErrorSource
- Raises:
telegram.Error
-
ID= 'passportElementErrorSourceFile'¶
-
static
read(q: dict, *args) → pytglib.api.types.passport_element_error_source_file.PassportElementErrorSourceFile¶
pytglib.api.types.passport_element_error_source_files module¶
-
class
pytglib.api.types.passport_element_error_source_files.PassportElementErrorSourceFiles(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe list of attached files contains an error. The error will be considered resolved when the list of files changes
- Attributes:
- ID (
str):PassportElementErrorSourceFiles
No parameters required.
- Returns:
- PassportElementErrorSource
- Raises:
telegram.Error
-
ID= 'passportElementErrorSourceFiles'¶
-
static
read(q: dict, *args) → pytglib.api.types.passport_element_error_source_files.PassportElementErrorSourceFiles¶
pytglib.api.types.passport_element_error_source_front_side module¶
-
class
pytglib.api.types.passport_element_error_source_front_side.PassportElementErrorSourceFrontSide(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe front side of the document contains an error. The error will be considered resolved when the file with the front side changes
- Attributes:
- ID (
str):PassportElementErrorSourceFrontSide
No parameters required.
- Returns:
- PassportElementErrorSource
- Raises:
telegram.Error
-
ID= 'passportElementErrorSourceFrontSide'¶
-
static
read(q: dict, *args) → pytglib.api.types.passport_element_error_source_front_side.PassportElementErrorSourceFrontSide¶
pytglib.api.types.passport_element_error_source_reverse_side module¶
-
class
pytglib.api.types.passport_element_error_source_reverse_side.PassportElementErrorSourceReverseSide(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe reverse side of the document contains an error. The error will be considered resolved when the file with the reverse side changes
- Attributes:
- ID (
str):PassportElementErrorSourceReverseSide
No parameters required.
- Returns:
- PassportElementErrorSource
- Raises:
telegram.Error
-
ID= 'passportElementErrorSourceReverseSide'¶
-
static
read(q: dict, *args) → pytglib.api.types.passport_element_error_source_reverse_side.PassportElementErrorSourceReverseSide¶
pytglib.api.types.passport_element_error_source_selfie module¶
-
class
pytglib.api.types.passport_element_error_source_selfie.PassportElementErrorSourceSelfie(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe selfie with the document contains an error. The error will be considered resolved when the file with the selfie changes
- Attributes:
- ID (
str):PassportElementErrorSourceSelfie
No parameters required.
- Returns:
- PassportElementErrorSource
- Raises:
telegram.Error
-
ID= 'passportElementErrorSourceSelfie'¶
-
static
read(q: dict, *args) → pytglib.api.types.passport_element_error_source_selfie.PassportElementErrorSourceSelfie¶
pytglib.api.types.passport_element_error_source_translation_file module¶
-
class
pytglib.api.types.passport_element_error_source_translation_file.PassportElementErrorSourceTranslationFile(file_index, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectOne of files with the translation of the document contains an error. The error will be considered resolved when the file changes
- Attributes:
- ID (
str):PassportElementErrorSourceTranslationFile - Args:
- file_index (
int): - Index of a file with the error
- file_index (
- Returns:
- PassportElementErrorSource
- Raises:
telegram.Error
-
ID= 'passportElementErrorSourceTranslationFile'¶
-
static
read(q: dict, *args) → pytglib.api.types.passport_element_error_source_translation_file.PassportElementErrorSourceTranslationFile¶
pytglib.api.types.passport_element_error_source_translation_files module¶
-
class
pytglib.api.types.passport_element_error_source_translation_files.PassportElementErrorSourceTranslationFiles(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe translation of the document contains an error. The error will be considered resolved when the list of translation files changes
- Attributes:
- ID (
str):PassportElementErrorSourceTranslationFiles
No parameters required.
- Returns:
- PassportElementErrorSource
- Raises:
telegram.Error
-
ID= 'passportElementErrorSourceTranslationFiles'¶
-
static
read(q: dict, *args) → pytglib.api.types.passport_element_error_source_translation_files.PassportElementErrorSourceTranslationFiles¶
pytglib.api.types.passport_element_error_source_unspecified module¶
-
class
pytglib.api.types.passport_element_error_source_unspecified.PassportElementErrorSourceUnspecified(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe element contains an error in an unspecified place. The error will be considered resolved when new data is added
- Attributes:
- ID (
str):PassportElementErrorSourceUnspecified
No parameters required.
- Returns:
- PassportElementErrorSource
- Raises:
telegram.Error
-
ID= 'passportElementErrorSourceUnspecified'¶
-
static
read(q: dict, *args) → pytglib.api.types.passport_element_error_source_unspecified.PassportElementErrorSourceUnspecified¶
pytglib.api.types.passport_element_identity_card module¶
-
class
pytglib.api.types.passport_element_identity_card.PassportElementIdentityCard(identity_card, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA Telegram Passport element containing the user’s identity card
- Attributes:
- ID (
str):PassportElementIdentityCard - Args:
- identity_card (
telegram.api.types.identityDocument): - Identity card
- identity_card (
- Returns:
- PassportElement
- Raises:
telegram.Error
-
ID= 'passportElementIdentityCard'¶
-
static
read(q: dict, *args) → pytglib.api.types.passport_element_identity_card.PassportElementIdentityCard¶
pytglib.api.types.passport_element_internal_passport module¶
-
class
pytglib.api.types.passport_element_internal_passport.PassportElementInternalPassport(internal_passport, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA Telegram Passport element containing the user’s internal passport
- Attributes:
- ID (
str):PassportElementInternalPassport - Args:
- internal_passport (
telegram.api.types.identityDocument): - Internal passport
- internal_passport (
- Returns:
- PassportElement
- Raises:
telegram.Error
-
ID= 'passportElementInternalPassport'¶
-
static
read(q: dict, *args) → pytglib.api.types.passport_element_internal_passport.PassportElementInternalPassport¶
pytglib.api.types.passport_element_passport module¶
-
class
pytglib.api.types.passport_element_passport.PassportElementPassport(passport, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA Telegram Passport element containing the user’s passport
- Attributes:
- ID (
str):PassportElementPassport - Args:
- passport (
telegram.api.types.identityDocument): - Passport
- passport (
- Returns:
- PassportElement
- Raises:
telegram.Error
-
ID= 'passportElementPassport'¶
-
static
read(q: dict, *args) → pytglib.api.types.passport_element_passport.PassportElementPassport¶
pytglib.api.types.passport_element_passport_registration module¶
-
class
pytglib.api.types.passport_element_passport_registration.PassportElementPassportRegistration(passport_registration, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA Telegram Passport element containing the user’s passport registration pages
- Attributes:
- ID (
str):PassportElementPassportRegistration - Args:
- passport_registration (
telegram.api.types.personalDocument): - Passport registration pages
- passport_registration (
- Returns:
- PassportElement
- Raises:
telegram.Error
-
ID= 'passportElementPassportRegistration'¶
-
static
read(q: dict, *args) → pytglib.api.types.passport_element_passport_registration.PassportElementPassportRegistration¶
pytglib.api.types.passport_element_personal_details module¶
-
class
pytglib.api.types.passport_element_personal_details.PassportElementPersonalDetails(personal_details, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA Telegram Passport element containing the user’s personal details
- Attributes:
- ID (
str):PassportElementPersonalDetails - Args:
- personal_details (
telegram.api.types.personalDetails): - Personal details of the user
- personal_details (
- Returns:
- PassportElement
- Raises:
telegram.Error
-
ID= 'passportElementPersonalDetails'¶
-
static
read(q: dict, *args) → pytglib.api.types.passport_element_personal_details.PassportElementPersonalDetails¶
pytglib.api.types.passport_element_phone_number module¶
-
class
pytglib.api.types.passport_element_phone_number.PassportElementPhoneNumber(phone_number, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA Telegram Passport element containing the user’s phone number
- Attributes:
- ID (
str):PassportElementPhoneNumber - Args:
- phone_number (
str): - Phone number
- phone_number (
- Returns:
- PassportElement
- Raises:
telegram.Error
-
ID= 'passportElementPhoneNumber'¶
-
static
read(q: dict, *args) → pytglib.api.types.passport_element_phone_number.PassportElementPhoneNumber¶
pytglib.api.types.passport_element_rental_agreement module¶
-
class
pytglib.api.types.passport_element_rental_agreement.PassportElementRentalAgreement(rental_agreement, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA Telegram Passport element containing the user’s rental agreement
- Attributes:
- ID (
str):PassportElementRentalAgreement - Args:
- rental_agreement (
telegram.api.types.personalDocument): - Rental agreement
- rental_agreement (
- Returns:
- PassportElement
- Raises:
telegram.Error
-
ID= 'passportElementRentalAgreement'¶
-
static
read(q: dict, *args) → pytglib.api.types.passport_element_rental_agreement.PassportElementRentalAgreement¶
pytglib.api.types.passport_element_temporary_registration module¶
-
class
pytglib.api.types.passport_element_temporary_registration.PassportElementTemporaryRegistration(temporary_registration, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA Telegram Passport element containing the user’s temporary registration
- Attributes:
- ID (
str):PassportElementTemporaryRegistration - Args:
- temporary_registration (
telegram.api.types.personalDocument): - Temporary registration
- temporary_registration (
- Returns:
- PassportElement
- Raises:
telegram.Error
-
ID= 'passportElementTemporaryRegistration'¶
-
static
read(q: dict, *args) → pytglib.api.types.passport_element_temporary_registration.PassportElementTemporaryRegistration¶
pytglib.api.types.passport_element_type module¶
-
class
pytglib.api.types.passport_element_type.PassportElementType(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains the type of a Telegram Passport element
No parameters required.
-
ID= 'passportElementType'¶
-
static
read(q: dict, *args) → PassportElementTypeAddress or PassportElementTypeUtilityBill or PassportElementTypeTemporaryRegistration or PassportElementTypePersonalDetails or PassportElementTypePhoneNumber or PassportElementTypePassport or PassportElementTypePassportRegistration or PassportElementTypeEmailAddress or PassportElementTypeBankStatement or PassportElementTypeIdentityCard or PassportElementTypeInternalPassport or PassportElementTypeDriverLicense or PassportElementTypeRentalAgreement¶
-
pytglib.api.types.passport_element_type_address module¶
-
class
pytglib.api.types.passport_element_type_address.PassportElementTypeAddress(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA Telegram Passport element containing the user’s address
- Attributes:
- ID (
str):PassportElementTypeAddress
No parameters required.
- Returns:
- PassportElementType
- Raises:
telegram.Error
-
ID= 'passportElementTypeAddress'¶
-
static
read(q: dict, *args) → pytglib.api.types.passport_element_type_address.PassportElementTypeAddress¶
pytglib.api.types.passport_element_type_bank_statement module¶
-
class
pytglib.api.types.passport_element_type_bank_statement.PassportElementTypeBankStatement(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA Telegram Passport element containing the user’s bank statement
- Attributes:
- ID (
str):PassportElementTypeBankStatement
No parameters required.
- Returns:
- PassportElementType
- Raises:
telegram.Error
-
ID= 'passportElementTypeBankStatement'¶
-
static
read(q: dict, *args) → pytglib.api.types.passport_element_type_bank_statement.PassportElementTypeBankStatement¶
pytglib.api.types.passport_element_type_driver_license module¶
-
class
pytglib.api.types.passport_element_type_driver_license.PassportElementTypeDriverLicense(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA Telegram Passport element containing the user’s driver license
- Attributes:
- ID (
str):PassportElementTypeDriverLicense
No parameters required.
- Returns:
- PassportElementType
- Raises:
telegram.Error
-
ID= 'passportElementTypeDriverLicense'¶
-
static
read(q: dict, *args) → pytglib.api.types.passport_element_type_driver_license.PassportElementTypeDriverLicense¶
pytglib.api.types.passport_element_type_email_address module¶
-
class
pytglib.api.types.passport_element_type_email_address.PassportElementTypeEmailAddress(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA Telegram Passport element containing the user’s email address
- Attributes:
- ID (
str):PassportElementTypeEmailAddress
No parameters required.
- Returns:
- PassportElementType
- Raises:
telegram.Error
-
ID= 'passportElementTypeEmailAddress'¶
-
static
read(q: dict, *args) → pytglib.api.types.passport_element_type_email_address.PassportElementTypeEmailAddress¶
pytglib.api.types.passport_element_type_identity_card module¶
-
class
pytglib.api.types.passport_element_type_identity_card.PassportElementTypeIdentityCard(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA Telegram Passport element containing the user’s identity card
- Attributes:
- ID (
str):PassportElementTypeIdentityCard
No parameters required.
- Returns:
- PassportElementType
- Raises:
telegram.Error
-
ID= 'passportElementTypeIdentityCard'¶
-
static
read(q: dict, *args) → pytglib.api.types.passport_element_type_identity_card.PassportElementTypeIdentityCard¶
pytglib.api.types.passport_element_type_internal_passport module¶
-
class
pytglib.api.types.passport_element_type_internal_passport.PassportElementTypeInternalPassport(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA Telegram Passport element containing the user’s internal passport
- Attributes:
- ID (
str):PassportElementTypeInternalPassport
No parameters required.
- Returns:
- PassportElementType
- Raises:
telegram.Error
-
ID= 'passportElementTypeInternalPassport'¶
-
static
read(q: dict, *args) → pytglib.api.types.passport_element_type_internal_passport.PassportElementTypeInternalPassport¶
pytglib.api.types.passport_element_type_passport module¶
-
class
pytglib.api.types.passport_element_type_passport.PassportElementTypePassport(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA Telegram Passport element containing the user’s passport
- Attributes:
- ID (
str):PassportElementTypePassport
No parameters required.
- Returns:
- PassportElementType
- Raises:
telegram.Error
-
ID= 'passportElementTypePassport'¶
-
static
read(q: dict, *args) → pytglib.api.types.passport_element_type_passport.PassportElementTypePassport¶
pytglib.api.types.passport_element_type_passport_registration module¶
-
class
pytglib.api.types.passport_element_type_passport_registration.PassportElementTypePassportRegistration(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA Telegram Passport element containing the registration page of the user’s passport
- Attributes:
- ID (
str):PassportElementTypePassportRegistration
No parameters required.
- Returns:
- PassportElementType
- Raises:
telegram.Error
-
ID= 'passportElementTypePassportRegistration'¶
-
static
read(q: dict, *args) → pytglib.api.types.passport_element_type_passport_registration.PassportElementTypePassportRegistration¶
pytglib.api.types.passport_element_type_personal_details module¶
-
class
pytglib.api.types.passport_element_type_personal_details.PassportElementTypePersonalDetails(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA Telegram Passport element containing the user’s personal details
- Attributes:
- ID (
str):PassportElementTypePersonalDetails
No parameters required.
- Returns:
- PassportElementType
- Raises:
telegram.Error
-
ID= 'passportElementTypePersonalDetails'¶
-
static
read(q: dict, *args) → pytglib.api.types.passport_element_type_personal_details.PassportElementTypePersonalDetails¶
pytglib.api.types.passport_element_type_phone_number module¶
-
class
pytglib.api.types.passport_element_type_phone_number.PassportElementTypePhoneNumber(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA Telegram Passport element containing the user’s phone number
- Attributes:
- ID (
str):PassportElementTypePhoneNumber
No parameters required.
- Returns:
- PassportElementType
- Raises:
telegram.Error
-
ID= 'passportElementTypePhoneNumber'¶
-
static
read(q: dict, *args) → pytglib.api.types.passport_element_type_phone_number.PassportElementTypePhoneNumber¶
pytglib.api.types.passport_element_type_rental_agreement module¶
-
class
pytglib.api.types.passport_element_type_rental_agreement.PassportElementTypeRentalAgreement(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA Telegram Passport element containing the user’s rental agreement
- Attributes:
- ID (
str):PassportElementTypeRentalAgreement
No parameters required.
- Returns:
- PassportElementType
- Raises:
telegram.Error
-
ID= 'passportElementTypeRentalAgreement'¶
-
static
read(q: dict, *args) → pytglib.api.types.passport_element_type_rental_agreement.PassportElementTypeRentalAgreement¶
pytglib.api.types.passport_element_type_temporary_registration module¶
-
class
pytglib.api.types.passport_element_type_temporary_registration.PassportElementTypeTemporaryRegistration(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA Telegram Passport element containing the user’s temporary registration
- Attributes:
- ID (
str):PassportElementTypeTemporaryRegistration
No parameters required.
- Returns:
- PassportElementType
- Raises:
telegram.Error
-
ID= 'passportElementTypeTemporaryRegistration'¶
-
static
read(q: dict, *args) → pytglib.api.types.passport_element_type_temporary_registration.PassportElementTypeTemporaryRegistration¶
pytglib.api.types.passport_element_type_utility_bill module¶
-
class
pytglib.api.types.passport_element_type_utility_bill.PassportElementTypeUtilityBill(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA Telegram Passport element containing the user’s utility bill
- Attributes:
- ID (
str):PassportElementTypeUtilityBill
No parameters required.
- Returns:
- PassportElementType
- Raises:
telegram.Error
-
ID= 'passportElementTypeUtilityBill'¶
-
static
read(q: dict, *args) → pytglib.api.types.passport_element_type_utility_bill.PassportElementTypeUtilityBill¶
pytglib.api.types.passport_element_utility_bill module¶
-
class
pytglib.api.types.passport_element_utility_bill.PassportElementUtilityBill(utility_bill, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA Telegram Passport element containing the user’s utility bill
- Attributes:
- ID (
str):PassportElementUtilityBill - Args:
- utility_bill (
telegram.api.types.personalDocument): - Utility bill
- utility_bill (
- Returns:
- PassportElement
- Raises:
telegram.Error
-
ID= 'passportElementUtilityBill'¶
-
static
read(q: dict, *args) → pytglib.api.types.passport_element_utility_bill.PassportElementUtilityBill¶
pytglib.api.types.passport_elements module¶
-
class
pytglib.api.types.passport_elements.PassportElements(elements, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains information about saved Telegram Passport elements
- Attributes:
- ID (
str):PassportElements - Args:
- elements (List of
telegram.api.types.PassportElement): - Telegram Passport elements
- elements (List of
- Returns:
- PassportElements
- Raises:
telegram.Error
-
ID= 'passportElements'¶
-
static
read(q: dict, *args) → pytglib.api.types.passport_elements.PassportElements¶
pytglib.api.types.passport_elements_with_errors module¶
-
class
pytglib.api.types.passport_elements_with_errors.PassportElementsWithErrors(elements, errors, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains information about a Telegram Passport elements and corresponding errors
- Attributes:
- ID (
str):PassportElementsWithErrors - Args:
- elements (List of
telegram.api.types.PassportElement): - Telegram Passport elements
- errors (List of
telegram.api.types.passportElementError): - Errors in the elements that are already available
- elements (List of
- Returns:
- PassportElementsWithErrors
- Raises:
telegram.Error
-
ID= 'passportElementsWithErrors'¶
-
static
read(q: dict, *args) → pytglib.api.types.passport_elements_with_errors.PassportElementsWithErrors¶
pytglib.api.types.passport_required_element module¶
-
class
pytglib.api.types.passport_required_element.PassportRequiredElement(suitable_elements, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains a description of the required Telegram Passport element that was requested by a service
- Attributes:
- ID (
str):PassportRequiredElement - Args:
- suitable_elements (List of
telegram.api.types.passportSuitableElement): - List of Telegram Passport elements any of which is enough to provide
- suitable_elements (List of
- Returns:
- PassportRequiredElement
- Raises:
telegram.Error
-
ID= 'passportRequiredElement'¶
-
static
read(q: dict, *args) → pytglib.api.types.passport_required_element.PassportRequiredElement¶
pytglib.api.types.passport_suitable_element module¶
-
class
pytglib.api.types.passport_suitable_element.PassportSuitableElement(type, is_selfie_required, is_translation_required, is_native_name_required, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains information about a Telegram Passport element that was requested by a service
- Attributes:
- ID (
str):PassportSuitableElement - Args:
- type (
telegram.api.types.PassportElementType): - Type of the element
- is_selfie_required (
bool): - True, if a selfie is required with the identity document
- is_translation_required (
bool): - True, if a certified English translation is required with the document
- is_native_name_required (
bool): - True, if personal details must include the user’s name in the language of their country of residence
- type (
- Returns:
- PassportSuitableElement
- Raises:
telegram.Error
-
ID= 'passportSuitableElement'¶
-
static
read(q: dict, *args) → pytglib.api.types.passport_suitable_element.PassportSuitableElement¶
pytglib.api.types.password_state module¶
-
class
pytglib.api.types.password_state.PasswordState(has_password, password_hint, has_recovery_email_address, has_passport_data, recovery_email_address_code_info, pending_reset_date, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents the current state of 2-step verification
- Attributes:
- ID (
str):PasswordState - Args:
- has_password (
bool): - True, if a 2-step verification password is set
- password_hint (
str): - Hint for the password; may be empty
- has_recovery_email_address (
bool): - True, if a recovery email is set
- has_passport_data (
bool): - True, if some Telegram Passport elements were saved
- recovery_email_address_code_info (
telegram.api.types.emailAddressAuthenticationCodeInfo): - Information about the recovery email address to which the confirmation email was sent; may be null
- pending_reset_date (
int): - If not 0, point in time (Unix timestamp) after which the password can be reset immediately using resetPassword
- has_password (
- Returns:
- PasswordState
- Raises:
telegram.Error
-
ID= 'passwordState'¶
-
static
read(q: dict, *args) → pytglib.api.types.password_state.PasswordState¶
pytglib.api.types.payment_form module¶
-
class
pytglib.api.types.payment_form.PaymentForm(id, invoice, seller_bot_user_id, payment_provider_user_id, payment_provider, saved_order_info, saved_credentials, can_save_credentials, need_password, product_title, product_description, product_photo, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains information about an invoice payment form
- Attributes:
- ID (
str):PaymentForm - Args:
- id (
int): - The payment form identifier
- invoice (
telegram.api.types.invoice): - Full information about the invoice
- seller_bot_user_id (
int): - User identifier of the seller bot
- payment_provider_user_id (
int): - User identifier of the payment provider bot
- payment_provider (
telegram.api.types.PaymentProvider): - Information about the payment provider
- saved_order_info (
telegram.api.types.orderInfo): - Saved server-side order information; may be null
- saved_credentials (
telegram.api.types.savedCredentials): - Information about saved card credentials; may be null
- can_save_credentials (
bool): - True, if the user can choose to save credentials
- need_password (
bool): - True, if the user will be able to save credentials protected by a password they set up
- product_title (
str): - Product title
- product_description (
telegram.api.types.formattedText): - Product description
- product_photo (
telegram.api.types.photo): - Product photo; may be null
- id (
- Returns:
- PaymentForm
- Raises:
telegram.Error
-
ID= 'paymentForm'¶
-
static
read(q: dict, *args) → pytglib.api.types.payment_form.PaymentForm¶
pytglib.api.types.payment_receipt module¶
-
class
pytglib.api.types.payment_receipt.PaymentReceipt(title, description, photo, date, seller_bot_user_id, payment_provider_user_id, invoice, order_info, shipping_option, credentials_title, tip_amount, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains information about a successful payment
- Attributes:
- ID (
str):PaymentReceipt - Args:
- title (
str): - Product title
- description (
telegram.api.types.formattedText): - Product description
- photo (
telegram.api.types.photo): - Product photo; may be null
- date (
int): - Point in time (Unix timestamp) when the payment was made
- seller_bot_user_id (
int): - User identifier of the seller bot
- payment_provider_user_id (
int): - User identifier of the payment provider bot
- invoice (
telegram.api.types.invoice): - Information about the invoice
- order_info (
telegram.api.types.orderInfo): - Order information; may be null
- shipping_option (
telegram.api.types.shippingOption): - Chosen shipping option; may be null
- credentials_title (
str): - Title of the saved credentials chosen by the buyer
- tip_amount (
int): - The amount of tip chosen by the buyer in the smallest units of the currency
- title (
- Returns:
- PaymentReceipt
- Raises:
telegram.Error
-
ID= 'paymentReceipt'¶
-
static
read(q: dict, *args) → pytglib.api.types.payment_receipt.PaymentReceipt¶
pytglib.api.types.payment_result module¶
-
class
pytglib.api.types.payment_result.PaymentResult(success, verification_url, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains the result of a payment request
- Attributes:
- ID (
str):PaymentResult - Args:
- success (
bool): - True, if the payment request was successful; otherwise the verification_url will be non-empty
- verification_url (
str): - URL for additional payment credentials verification
- success (
- Returns:
- PaymentResult
- Raises:
telegram.Error
-
ID= 'paymentResult'¶
-
static
read(q: dict, *args) → pytglib.api.types.payment_result.PaymentResult¶
pytglib.api.types.payments_provider_stripe module¶
pytglib.api.types.personal_details module¶
-
class
pytglib.api.types.personal_details.PersonalDetails(first_name, middle_name, last_name, native_first_name, native_middle_name, native_last_name, birthdate, gender, country_code, residence_country_code, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains the user’s personal details
- Attributes:
- ID (
str):PersonalDetails - Args:
- first_name (
str): - First name of the user written in English; 1-255 characters
- middle_name (
str): - Middle name of the user written in English; 0-255 characters
- last_name (
str): - Last name of the user written in English; 1-255 characters
- native_first_name (
str): - Native first name of the user; 1-255 characters
- native_middle_name (
str): - Native middle name of the user; 0-255 characters
- native_last_name (
str): - Native last name of the user; 1-255 characters
- birthdate (
telegram.api.types.date): - Birthdate of the user
- gender (
str): - Gender of the user, “male” or “female”
- country_code (
str): - A two-letter ISO 3166-1 alpha-2 country code of the user’s country
- residence_country_code (
str): - A two-letter ISO 3166-1 alpha-2 country code of the user’s residence country
- first_name (
- Returns:
- PersonalDetails
- Raises:
telegram.Error
-
ID= 'personalDetails'¶
-
static
read(q: dict, *args) → pytglib.api.types.personal_details.PersonalDetails¶
pytglib.api.types.personal_document module¶
-
class
pytglib.api.types.personal_document.PersonalDocument(files, translation, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA personal document, containing some information about a user
- Attributes:
- ID (
str):PersonalDocument - Args:
- files (List of
telegram.api.types.datedFile): - List of files containing the pages of the document
- translation (List of
telegram.api.types.datedFile): - List of files containing a certified English translation of the document
- files (List of
- Returns:
- PersonalDocument
- Raises:
telegram.Error
-
ID= 'personalDocument'¶
-
static
read(q: dict, *args) → pytglib.api.types.personal_document.PersonalDocument¶
pytglib.api.types.phone_number_authentication_settings module¶
-
class
pytglib.api.types.phone_number_authentication_settings.PhoneNumberAuthenticationSettings(allow_flash_call, allow_missed_call, is_current_phone_number, allow_sms_retriever_api, authentication_tokens, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains settings for the authentication of the user’s phone number
- Attributes:
- ID (
str):PhoneNumberAuthenticationSettings - Args:
- allow_flash_call (
bool): - Pass true if the authentication code may be sent via a flash call to the specified phone number
- allow_missed_call (
bool): - Pass true if the authentication code may be sent via a missed call to the specified phone number
- is_current_phone_number (
bool): - Pass true if the authenticated phone number is used on the current device
- allow_sms_retriever_api (
bool): - For official applications onlyTrue, if the application can use Android SMS Retriever API (requires Google Play Services >= 102) to automatically receive the authentication code from the SMSSee https://developersgooglecom/identity/sms-retriever/ for more details
- authentication_tokens (List of
str): - List of up to 20 authentication tokens, recently received in updateOption(“authentication_token”) in previously logged out sessions
- allow_flash_call (
- Returns:
- PhoneNumberAuthenticationSettings
- Raises:
telegram.Error
-
ID= 'phoneNumberAuthenticationSettings'¶
-
static
read(q: dict, *args) → pytglib.api.types.phone_number_authentication_settings.PhoneNumberAuthenticationSettings¶
pytglib.api.types.photo module¶
-
class
pytglib.api.types.photo.Photo(has_stickers, minithumbnail, sizes, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectDescribes a photo
- Attributes:
- ID (
str):Photo - Args:
- has_stickers (
bool): - True, if stickers were added to the photoThe list of corresponding sticker sets can be received using getAttachedStickerSets
- minithumbnail (
telegram.api.types.minithumbnail): - Photo minithumbnail; may be null
- sizes (List of
telegram.api.types.photoSize): - Available variants of the photo, in different sizes
- has_stickers (
- Returns:
- Photo
- Raises:
telegram.Error
-
ID= 'photo'¶
-
static
read(q: dict, *args) → pytglib.api.types.photo.Photo¶
pytglib.api.types.photo_size module¶
-
class
pytglib.api.types.photo_size.PhotoSize(type, photo, width, height, progressive_sizes, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectDescribes an image in JPEG format
- Attributes:
- ID (
str):PhotoSize - Args:
- type (
str): - Image type (see https://coretelegramorg/constructor/photoSize)
- photo (
telegram.api.types.file): - Information about the image file
- width (
int): - Image width
- height (
int): - Image height
- progressive_sizes (List of
int): - Sizes of progressive JPEG file prefixes, which can be used to preliminarily show the image; in bytes
- type (
- Returns:
- PhotoSize
- Raises:
telegram.Error
-
ID= 'photoSize'¶
-
static
read(q: dict, *args) → pytglib.api.types.photo_size.PhotoSize¶
pytglib.api.types.poll module¶
-
class
pytglib.api.types.poll.Poll(id, question, options, total_voter_count, recent_voter_user_ids, is_anonymous, type, open_period, close_date, is_closed, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectDescribes a poll
- Attributes:
- ID (
str):Poll - Args:
- id (
int): - Unique poll identifier
- question (
str): - Poll question; 1-300 characters
- options (List of
telegram.api.types.pollOption): - List of poll answer options
- total_voter_count (
int): - Total number of voters, participating in the poll
- recent_voter_user_ids (List of
int): - User identifiers of recent voters, if the poll is non-anonymous
- is_anonymous (
bool): - True, if the poll is anonymous
- type (
telegram.api.types.PollType): - Type of the poll
- open_period (
int): - Amount of time the poll will be active after creation, in seconds
- close_date (
int): - Point in time (Unix timestamp) when the poll will automatically be closed
- is_closed (
bool): - True, if the poll is closed
- id (
- Returns:
- Poll
- Raises:
telegram.Error
-
ID= 'poll'¶
-
static
read(q: dict, *args) → pytglib.api.types.poll.Poll¶
pytglib.api.types.poll_option module¶
-
class
pytglib.api.types.poll_option.PollOption(text, voter_count, vote_percentage, is_chosen, is_being_chosen, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectDescribes one answer option of a poll
- Attributes:
- ID (
str):PollOption - Args:
- text (
str): - Option text; 1-100 characters
- voter_count (
int): - Number of voters for this option, available only for closed or voted polls
- vote_percentage (
int): - The percentage of votes for this option; 0-100
- is_chosen (
bool): - True, if the option was chosen by the user
- is_being_chosen (
bool): - True, if the option is being chosen by a pending setPollAnswer request
- text (
- Returns:
- PollOption
- Raises:
telegram.Error
-
ID= 'pollOption'¶
-
static
read(q: dict, *args) → pytglib.api.types.poll_option.PollOption¶
pytglib.api.types.poll_type module¶
-
class
pytglib.api.types.poll_type.PollType(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectDescribes the type of a poll
No parameters required.
-
ID= 'pollType'¶
-
static
read(q: dict, *args) → PollTypeRegular or PollTypeQuiz¶
-
pytglib.api.types.poll_type_quiz module¶
-
class
pytglib.api.types.poll_type_quiz.PollTypeQuiz(correct_option_id, explanation, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA poll in quiz mode, which has exactly one correct answer option and can be answered only once
- Attributes:
- ID (
str):PollTypeQuiz - Args:
- correct_option_id (
int): - 0-based identifier of the correct answer option; -1 for a yet unanswered poll
- explanation (
telegram.api.types.formattedText): - Text that is shown when the user chooses an incorrect answer or taps on the lamp icon; 0-200 characters with at most 2 line feeds; empty for a yet unanswered poll
- correct_option_id (
- Returns:
- PollType
- Raises:
telegram.Error
-
ID= 'pollTypeQuiz'¶
-
static
read(q: dict, *args) → pytglib.api.types.poll_type_quiz.PollTypeQuiz¶
pytglib.api.types.poll_type_regular module¶
-
class
pytglib.api.types.poll_type_regular.PollTypeRegular(allow_multiple_answers, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA regular poll
- Attributes:
- ID (
str):PollTypeRegular - Args:
- allow_multiple_answers (
bool): - True, if multiple answer options can be chosen simultaneously
- allow_multiple_answers (
- Returns:
- PollType
- Raises:
telegram.Error
-
ID= 'pollTypeRegular'¶
-
static
read(q: dict, *args) → pytglib.api.types.poll_type_regular.PollTypeRegular¶
pytglib.api.types.profile_photo module¶
-
class
pytglib.api.types.profile_photo.ProfilePhoto(id, small, big, minithumbnail, has_animation, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectDescribes a user profile photo
- Attributes:
- ID (
str):ProfilePhoto - Args:
- id (
int): - Photo identifier; 0 for an empty photoCan be used to find a photo in a list of user profile photos
- small (
telegram.api.types.file): - A small (160x160) user profile photoThe file can be downloaded only before the photo is changed
- big (
telegram.api.types.file): - A big (640x640) user profile photoThe file can be downloaded only before the photo is changed
- minithumbnail (
telegram.api.types.minithumbnail): - User profile photo minithumbnail; may be null
- has_animation (
bool): - True, if the photo has animated variant
- id (
- Returns:
- ProfilePhoto
- Raises:
telegram.Error
-
ID= 'profilePhoto'¶
-
static
read(q: dict, *args) → pytglib.api.types.profile_photo.ProfilePhoto¶
pytglib.api.types.proxies module¶
-
class
pytglib.api.types.proxies.Proxies(proxies, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents a list of proxy servers
- Attributes:
- ID (
str):Proxies - Args:
- proxies (List of
telegram.api.types.proxy): - List of proxy servers
- proxies (List of
- Returns:
- Proxies
- Raises:
telegram.Error
-
ID= 'proxies'¶
-
static
read(q: dict, *args) → pytglib.api.types.proxies.Proxies¶
pytglib.api.types.proxy module¶
-
class
pytglib.api.types.proxy.Proxy(id, server, port, last_used_date, is_enabled, type, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains information about a proxy server
- Attributes:
- ID (
str):Proxy - Args:
- id (
int): - Unique identifier of the proxy
- server (
str): - Proxy server IP address
- port (
int): - Proxy server port
- last_used_date (
int): - Point in time (Unix timestamp) when the proxy was last used; 0 if never
- is_enabled (
bool): - True, if the proxy is enabled now
- type (
telegram.api.types.ProxyType): - Type of the proxy
- id (
- Returns:
- Proxy
- Raises:
telegram.Error
-
ID= 'proxy'¶
-
static
read(q: dict, *args) → pytglib.api.types.proxy.Proxy¶
pytglib.api.types.proxy_type module¶
-
class
pytglib.api.types.proxy_type.ProxyType(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectDescribes the type of a proxy server
No parameters required.
-
ID= 'proxyType'¶
-
static
read(q: dict, *args) → ProxyTypeMtproto or ProxyTypeSocks5 or ProxyTypeHttp¶
-
pytglib.api.types.proxy_type_http module¶
-
class
pytglib.api.types.proxy_type_http.ProxyTypeHttp(username, password, http_only, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA HTTP transparent proxy server
- Attributes:
- ID (
str):ProxyTypeHttp - Args:
- username (
str): - Username for logging in; may be empty
- password (
str): - Password for logging in; may be empty
- http_only (
bool): - Pass true if the proxy supports only HTTP requests and doesn’t support transparent TCP connections via HTTP CONNECT method
- username (
- Returns:
- ProxyType
- Raises:
telegram.Error
-
ID= 'proxyTypeHttp'¶
-
static
read(q: dict, *args) → pytglib.api.types.proxy_type_http.ProxyTypeHttp¶
pytglib.api.types.proxy_type_mtproto module¶
-
class
pytglib.api.types.proxy_type_mtproto.ProxyTypeMtproto(secret, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectAn MTProto proxy server
- Attributes:
- ID (
str):ProxyTypeMtproto - Args:
- secret (
str): - The proxy’s secret in hexadecimal encoding
- secret (
- Returns:
- ProxyType
- Raises:
telegram.Error
-
ID= 'proxyTypeMtproto'¶
-
static
read(q: dict, *args) → pytglib.api.types.proxy_type_mtproto.ProxyTypeMtproto¶
pytglib.api.types.proxy_type_socks5 module¶
-
class
pytglib.api.types.proxy_type_socks5.ProxyTypeSocks5(username, password, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA SOCKS5 proxy server
- Attributes:
- ID (
str):ProxyTypeSocks5 - Args:
- username (
str): - Username for logging in; may be empty
- password (
str): - Password for logging in; may be empty
- username (
- Returns:
- ProxyType
- Raises:
telegram.Error
-
ID= 'proxyTypeSocks5'¶
-
static
read(q: dict, *args) → pytglib.api.types.proxy_type_socks5.ProxyTypeSocks5¶
pytglib.api.types.public_chat_type module¶
-
class
pytglib.api.types.public_chat_type.PublicChatType(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectDescribes a type of public chats
No parameters required.
-
ID= 'publicChatType'¶
-
static
read(q: dict, *args) → PublicChatTypeIsLocationBased or PublicChatTypeHasUsername¶
-
pytglib.api.types.public_chat_type_has_username module¶
-
class
pytglib.api.types.public_chat_type_has_username.PublicChatTypeHasUsername(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe chat is public, because it has username
- Attributes:
- ID (
str):PublicChatTypeHasUsername
No parameters required.
- Returns:
- PublicChatType
- Raises:
telegram.Error
-
ID= 'publicChatTypeHasUsername'¶
-
static
read(q: dict, *args) → pytglib.api.types.public_chat_type_has_username.PublicChatTypeHasUsername¶
pytglib.api.types.public_chat_type_is_location_based module¶
-
class
pytglib.api.types.public_chat_type_is_location_based.PublicChatTypeIsLocationBased(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe chat is public, because it is a location-based supergroup
- Attributes:
- ID (
str):PublicChatTypeIsLocationBased
No parameters required.
- Returns:
- PublicChatType
- Raises:
telegram.Error
-
ID= 'publicChatTypeIsLocationBased'¶
-
static
read(q: dict, *args) → pytglib.api.types.public_chat_type_is_location_based.PublicChatTypeIsLocationBased¶
pytglib.api.types.public_message_link module¶
pytglib.api.types.push_message_content module¶
-
class
pytglib.api.types.push_message_content.PushMessageContent(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains content of a push message notification
No parameters required.
-
ID= 'pushMessageContent'¶
-
static
read(q: dict, *args) → PushMessageContentChatDeleteMember or PushMessageContentChatJoinByLink or PushMessageContentVideoNote or PushMessageContentScreenshotTaken or PushMessageContentGame or PushMessageContentHidden or PushMessageContentAnimation or PushMessageContentVoiceNote or PushMessageContentBasicGroupChatCreate or PushMessageContentGameScore or PushMessageContentInvoice or PushMessageContentChatSetTheme or PushMessageContentChatChangePhoto or PushMessageContentDocument or PushMessageContentSticker or PushMessageContentPhoto or PushMessageContentVideo or PushMessageContentLocation or PushMessageContentContact or PushMessageContentMessageForwards or PushMessageContentRecurringPayment or PushMessageContentContactRegistered or PushMessageContentChatChangeTitle or PushMessageContentChatAddMembers or PushMessageContentMediaAlbum or PushMessageContentPoll or PushMessageContentText or PushMessageContentChatJoinByRequest or PushMessageContentAudio¶
-
pytglib.api.types.push_message_content_animation module¶
-
class
pytglib.api.types.push_message_content_animation.PushMessageContentAnimation(animation, caption, is_pinned, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectAn animation message (GIF-style).
- Attributes:
- ID (
str):PushMessageContentAnimation - Args:
- animation (
telegram.api.types.animation): - Message content; may be null
- caption (
str): - Animation caption
- is_pinned (
bool): - True, if the message is a pinned message with the specified content
- animation (
- Returns:
- PushMessageContent
- Raises:
telegram.Error
-
ID= 'pushMessageContentAnimation'¶
-
static
read(q: dict, *args) → pytglib.api.types.push_message_content_animation.PushMessageContentAnimation¶
pytglib.api.types.push_message_content_audio module¶
-
class
pytglib.api.types.push_message_content_audio.PushMessageContentAudio(audio, is_pinned, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectAn audio message
- Attributes:
- ID (
str):PushMessageContentAudio - Args:
- audio (
telegram.api.types.audio): - Message content; may be null
- is_pinned (
bool): - True, if the message is a pinned message with the specified content
- audio (
- Returns:
- PushMessageContent
- Raises:
telegram.Error
-
ID= 'pushMessageContentAudio'¶
-
static
read(q: dict, *args) → pytglib.api.types.push_message_content_audio.PushMessageContentAudio¶
pytglib.api.types.push_message_content_basic_group_chat_create module¶
-
class
pytglib.api.types.push_message_content_basic_group_chat_create.PushMessageContentBasicGroupChatCreate(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA newly created basic group
- Attributes:
- ID (
str):PushMessageContentBasicGroupChatCreate
No parameters required.
- Returns:
- PushMessageContent
- Raises:
telegram.Error
-
ID= 'pushMessageContentBasicGroupChatCreate'¶
-
static
read(q: dict, *args) → pytglib.api.types.push_message_content_basic_group_chat_create.PushMessageContentBasicGroupChatCreate¶
pytglib.api.types.push_message_content_chat_add_members module¶
-
class
pytglib.api.types.push_message_content_chat_add_members.PushMessageContentChatAddMembers(member_name, is_current_user, is_returned, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectNew chat members were invited to a group
- Attributes:
- ID (
str):PushMessageContentChatAddMembers - Args:
- member_name (
str): - Name of the added member
- is_current_user (
bool): - True, if the current user was added to the group
- is_returned (
bool): - True, if the user has returned to the group themselves
- member_name (
- Returns:
- PushMessageContent
- Raises:
telegram.Error
-
ID= 'pushMessageContentChatAddMembers'¶
-
static
read(q: dict, *args) → pytglib.api.types.push_message_content_chat_add_members.PushMessageContentChatAddMembers¶
pytglib.api.types.push_message_content_chat_change_photo module¶
-
class
pytglib.api.types.push_message_content_chat_change_photo.PushMessageContentChatChangePhoto(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA chat photo was edited
- Attributes:
- ID (
str):PushMessageContentChatChangePhoto
No parameters required.
- Returns:
- PushMessageContent
- Raises:
telegram.Error
-
ID= 'pushMessageContentChatChangePhoto'¶
-
static
read(q: dict, *args) → pytglib.api.types.push_message_content_chat_change_photo.PushMessageContentChatChangePhoto¶
pytglib.api.types.push_message_content_chat_change_title module¶
-
class
pytglib.api.types.push_message_content_chat_change_title.PushMessageContentChatChangeTitle(title, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA chat title was edited
- Attributes:
- ID (
str):PushMessageContentChatChangeTitle - Args:
- title (
str): - New chat title
- title (
- Returns:
- PushMessageContent
- Raises:
telegram.Error
-
ID= 'pushMessageContentChatChangeTitle'¶
-
static
read(q: dict, *args) → pytglib.api.types.push_message_content_chat_change_title.PushMessageContentChatChangeTitle¶
pytglib.api.types.push_message_content_chat_delete_member module¶
-
class
pytglib.api.types.push_message_content_chat_delete_member.PushMessageContentChatDeleteMember(member_name, is_current_user, is_left, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA chat member was deleted
- Attributes:
- ID (
str):PushMessageContentChatDeleteMember - Args:
- member_name (
str): - Name of the deleted member
- is_current_user (
bool): - True, if the current user was deleted from the group
- is_left (
bool): - True, if the user has left the group themselves
- member_name (
- Returns:
- PushMessageContent
- Raises:
telegram.Error
-
ID= 'pushMessageContentChatDeleteMember'¶
-
static
read(q: dict, *args) → pytglib.api.types.push_message_content_chat_delete_member.PushMessageContentChatDeleteMember¶
pytglib.api.types.push_message_content_chat_join_by_link module¶
-
class
pytglib.api.types.push_message_content_chat_join_by_link.PushMessageContentChatJoinByLink(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA new member joined the chat via an invite link
- Attributes:
- ID (
str):PushMessageContentChatJoinByLink
No parameters required.
- Returns:
- PushMessageContent
- Raises:
telegram.Error
-
ID= 'pushMessageContentChatJoinByLink'¶
-
static
read(q: dict, *args) → pytglib.api.types.push_message_content_chat_join_by_link.PushMessageContentChatJoinByLink¶
pytglib.api.types.push_message_content_contact module¶
-
class
pytglib.api.types.push_message_content_contact.PushMessageContentContact(name, is_pinned, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA message with a user contact
- Attributes:
- ID (
str):PushMessageContentContact - Args:
- name (
str): - Contact’s name
- is_pinned (
bool): - True, if the message is a pinned message with the specified content
- name (
- Returns:
- PushMessageContent
- Raises:
telegram.Error
-
ID= 'pushMessageContentContact'¶
-
static
read(q: dict, *args) → pytglib.api.types.push_message_content_contact.PushMessageContentContact¶
pytglib.api.types.push_message_content_contact_registered module¶
-
class
pytglib.api.types.push_message_content_contact_registered.PushMessageContentContactRegistered(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA contact has registered with Telegram
- Attributes:
- ID (
str):PushMessageContentContactRegistered
No parameters required.
- Returns:
- PushMessageContent
- Raises:
telegram.Error
-
ID= 'pushMessageContentContactRegistered'¶
-
static
read(q: dict, *args) → pytglib.api.types.push_message_content_contact_registered.PushMessageContentContactRegistered¶
pytglib.api.types.push_message_content_document module¶
-
class
pytglib.api.types.push_message_content_document.PushMessageContentDocument(document, is_pinned, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA document message (a general file)
- Attributes:
- ID (
str):PushMessageContentDocument - Args:
- document (
telegram.api.types.document): - Message content; may be null
- is_pinned (
bool): - True, if the message is a pinned message with the specified content
- document (
- Returns:
- PushMessageContent
- Raises:
telegram.Error
-
ID= 'pushMessageContentDocument'¶
-
static
read(q: dict, *args) → pytglib.api.types.push_message_content_document.PushMessageContentDocument¶
pytglib.api.types.push_message_content_game module¶
-
class
pytglib.api.types.push_message_content_game.PushMessageContentGame(title, is_pinned, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA message with a game
- Attributes:
- ID (
str):PushMessageContentGame - Args:
- title (
str): - Game title, empty for pinned game message
- is_pinned (
bool): - True, if the message is a pinned message with the specified content
- title (
- Returns:
- PushMessageContent
- Raises:
telegram.Error
-
ID= 'pushMessageContentGame'¶
-
static
read(q: dict, *args) → pytglib.api.types.push_message_content_game.PushMessageContentGame¶
pytglib.api.types.push_message_content_game_score module¶
-
class
pytglib.api.types.push_message_content_game_score.PushMessageContentGameScore(title, score, is_pinned, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA new high score was achieved in a game
- Attributes:
- ID (
str):PushMessageContentGameScore - Args:
- title (
str): - Game title, empty for pinned message
- score (
int): - New score, 0 for pinned message
- is_pinned (
bool): - True, if the message is a pinned message with the specified content
- title (
- Returns:
- PushMessageContent
- Raises:
telegram.Error
-
ID= 'pushMessageContentGameScore'¶
-
static
read(q: dict, *args) → pytglib.api.types.push_message_content_game_score.PushMessageContentGameScore¶
pytglib.api.types.push_message_content_invoice module¶
-
class
pytglib.api.types.push_message_content_invoice.PushMessageContentInvoice(price, is_pinned, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA message with an invoice from a bot
- Attributes:
- ID (
str):PushMessageContentInvoice - Args:
- price (
str): - Product price
- is_pinned (
bool): - True, if the message is a pinned message with the specified content
- price (
- Returns:
- PushMessageContent
- Raises:
telegram.Error
-
ID= 'pushMessageContentInvoice'¶
-
static
read(q: dict, *args) → pytglib.api.types.push_message_content_invoice.PushMessageContentInvoice¶
pytglib.api.types.push_message_content_location module¶
-
class
pytglib.api.types.push_message_content_location.PushMessageContentLocation(is_live, is_pinned, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA message with a location
- Attributes:
- ID (
str):PushMessageContentLocation - Args:
- is_live (
bool): - True, if the location is live
- is_pinned (
bool): - True, if the message is a pinned message with the specified content
- is_live (
- Returns:
- PushMessageContent
- Raises:
telegram.Error
-
ID= 'pushMessageContentLocation'¶
-
static
read(q: dict, *args) → pytglib.api.types.push_message_content_location.PushMessageContentLocation¶
pytglib.api.types.push_message_content_media_album module¶
-
class
pytglib.api.types.push_message_content_media_album.PushMessageContentMediaAlbum(total_count, has_photos, has_videos, has_audios, has_documents, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA media album
- Attributes:
- ID (
str):PushMessageContentMediaAlbum - Args:
- total_count (
int): - Number of messages in the album
- has_photos (
bool): - True, if the album has at least one photo
- has_videos (
bool): - True, if the album has at least one video
- has_audios (
bool): - True, if the album has at least one audio file
- has_documents (
bool): - True, if the album has at least one document
- total_count (
- Returns:
- PushMessageContent
- Raises:
telegram.Error
-
ID= 'pushMessageContentMediaAlbum'¶
-
static
read(q: dict, *args) → pytglib.api.types.push_message_content_media_album.PushMessageContentMediaAlbum¶
pytglib.api.types.push_message_content_message_forwards module¶
-
class
pytglib.api.types.push_message_content_message_forwards.PushMessageContentMessageForwards(total_count, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA forwarded messages
- Attributes:
- ID (
str):PushMessageContentMessageForwards - Args:
- total_count (
int): - Number of forwarded messages
- total_count (
- Returns:
- PushMessageContent
- Raises:
telegram.Error
-
ID= 'pushMessageContentMessageForwards'¶
-
static
read(q: dict, *args) → pytglib.api.types.push_message_content_message_forwards.PushMessageContentMessageForwards¶
pytglib.api.types.push_message_content_photo module¶
-
class
pytglib.api.types.push_message_content_photo.PushMessageContentPhoto(photo, caption, is_secret, is_pinned, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA photo message
- Attributes:
- ID (
str):PushMessageContentPhoto - Args:
- photo (
telegram.api.types.photo): - Message content; may be null
- caption (
str): - Photo caption
- is_secret (
bool): - True, if the photo is secret
- is_pinned (
bool): - True, if the message is a pinned message with the specified content
- photo (
- Returns:
- PushMessageContent
- Raises:
telegram.Error
-
ID= 'pushMessageContentPhoto'¶
-
static
read(q: dict, *args) → pytglib.api.types.push_message_content_photo.PushMessageContentPhoto¶
pytglib.api.types.push_message_content_poll module¶
-
class
pytglib.api.types.push_message_content_poll.PushMessageContentPoll(question, is_regular, is_pinned, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA message with a poll
- Attributes:
- ID (
str):PushMessageContentPoll - Args:
- question (
str): - Poll question
- is_regular (
bool): - True, if the poll is regular and not in quiz mode
- is_pinned (
bool): - True, if the message is a pinned message with the specified content
- question (
- Returns:
- PushMessageContent
- Raises:
telegram.Error
-
ID= 'pushMessageContentPoll'¶
-
static
read(q: dict, *args) → pytglib.api.types.push_message_content_poll.PushMessageContentPoll¶
pytglib.api.types.push_message_content_screenshot_taken module¶
-
class
pytglib.api.types.push_message_content_screenshot_taken.PushMessageContentScreenshotTaken(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA screenshot of a message in the chat has been taken
- Attributes:
- ID (
str):PushMessageContentScreenshotTaken
No parameters required.
- Returns:
- PushMessageContent
- Raises:
telegram.Error
-
ID= 'pushMessageContentScreenshotTaken'¶
-
static
read(q: dict, *args) → pytglib.api.types.push_message_content_screenshot_taken.PushMessageContentScreenshotTaken¶
pytglib.api.types.push_message_content_sticker module¶
-
class
pytglib.api.types.push_message_content_sticker.PushMessageContentSticker(sticker, emoji, is_pinned, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA message with a sticker
- Attributes:
- ID (
str):PushMessageContentSticker - Args:
- sticker (
telegram.api.types.sticker): - Message content; may be null
- emoji (
str): - Emoji corresponding to the sticker; may be empty
- is_pinned (
bool): - True, if the message is a pinned message with the specified content
- sticker (
- Returns:
- PushMessageContent
- Raises:
telegram.Error
-
ID= 'pushMessageContentSticker'¶
-
static
read(q: dict, *args) → pytglib.api.types.push_message_content_sticker.PushMessageContentSticker¶
pytglib.api.types.push_message_content_text module¶
-
class
pytglib.api.types.push_message_content_text.PushMessageContentText(text, is_pinned, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA text message
- Attributes:
- ID (
str):PushMessageContentText - Args:
- text (
str): - Message text
- is_pinned (
bool): - True, if the message is a pinned message with the specified content
- text (
- Returns:
- PushMessageContent
- Raises:
telegram.Error
-
ID= 'pushMessageContentText'¶
-
static
read(q: dict, *args) → pytglib.api.types.push_message_content_text.PushMessageContentText¶
pytglib.api.types.push_message_content_video module¶
-
class
pytglib.api.types.push_message_content_video.PushMessageContentVideo(video, caption, is_secret, is_pinned, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA video message
- Attributes:
- ID (
str):PushMessageContentVideo - Args:
- video (
telegram.api.types.video): - Message content; may be null
- caption (
str): - Video caption
- is_secret (
bool): - True, if the video is secret
- is_pinned (
bool): - True, if the message is a pinned message with the specified content
- video (
- Returns:
- PushMessageContent
- Raises:
telegram.Error
-
ID= 'pushMessageContentVideo'¶
-
static
read(q: dict, *args) → pytglib.api.types.push_message_content_video.PushMessageContentVideo¶
pytglib.api.types.push_message_content_video_note module¶
-
class
pytglib.api.types.push_message_content_video_note.PushMessageContentVideoNote(video_note, is_pinned, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA video note message
- Attributes:
- ID (
str):PushMessageContentVideoNote - Args:
- video_note (
telegram.api.types.videoNote): - Message content; may be null
- is_pinned (
bool): - True, if the message is a pinned message with the specified content
- video_note (
- Returns:
- PushMessageContent
- Raises:
telegram.Error
-
ID= 'pushMessageContentVideoNote'¶
-
static
read(q: dict, *args) → pytglib.api.types.push_message_content_video_note.PushMessageContentVideoNote¶
pytglib.api.types.push_message_content_voice_note module¶
-
class
pytglib.api.types.push_message_content_voice_note.PushMessageContentVoiceNote(voice_note, is_pinned, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA voice note message
- Attributes:
- ID (
str):PushMessageContentVoiceNote - Args:
- voice_note (
telegram.api.types.voiceNote): - Message content; may be null
- is_pinned (
bool): - True, if the message is a pinned message with the specified content
- voice_note (
- Returns:
- PushMessageContent
- Raises:
telegram.Error
-
ID= 'pushMessageContentVoiceNote'¶
-
static
read(q: dict, *args) → pytglib.api.types.push_message_content_voice_note.PushMessageContentVoiceNote¶
pytglib.api.types.push_receiver_id module¶
-
class
pytglib.api.types.push_receiver_id.PushReceiverId(id, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains a globally unique push receiver identifier, which can be used to identify which account has received a push notification
- Attributes:
- ID (
str):PushReceiverId - Args:
- id (
int): - The globally unique identifier of push notification subscription
- id (
- Returns:
- PushReceiverId
- Raises:
telegram.Error
-
ID= 'pushReceiverId'¶
-
static
read(q: dict, *args) → pytglib.api.types.push_receiver_id.PushReceiverId¶
pytglib.api.types.recovery_email_address module¶
-
class
pytglib.api.types.recovery_email_address.RecoveryEmailAddress(recovery_email_address, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains information about the current recovery email address
- Attributes:
- ID (
str):RecoveryEmailAddress - Args:
- recovery_email_address (
str): - Recovery email address
- recovery_email_address (
- Returns:
- RecoveryEmailAddress
- Raises:
telegram.Error
-
ID= 'recoveryEmailAddress'¶
-
static
read(q: dict, *args) → pytglib.api.types.recovery_email_address.RecoveryEmailAddress¶
pytglib.api.types.remote_file module¶
-
class
pytglib.api.types.remote_file.RemoteFile(id, unique_id, is_uploading_active, is_uploading_completed, uploaded_size, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents a remote file
- Attributes:
- ID (
str):RemoteFile - Args:
- id (
str): - Remote file identifier; may be emptyCan be used by the current user across application restarts or even from other devicesUniquely identifies a file, but a file can have a lot of different valid identifiersIf the ID starts with “http://” or “https://”, it represents the HTTP URL of the fileTDLib is currently unable to download files if only their URL is knownIf downloadFile/addFileToDownloads is called on such a file or if it is sent to a secret chat, TDLib starts a file generation process by sending updateFileGenerationStart to the application with the HTTP URL in the original_path and “#url#” as the conversion stringApplication must generate the file by downloading it to the specified location
- unique_id (
str): - Unique file identifier; may be empty if unknownThe unique file identifier which is the same for the same file even for different users and is persistent over time
- is_uploading_active (
bool): - True, if the file is currently being uploaded (or a remote copy is being generated by some other means)
- is_uploading_completed (
bool): - True, if a remote copy is fully available
- uploaded_size (
int): - Size of the remote available part of the file, in bytes; 0 if unknown
- id (
- Returns:
- RemoteFile
- Raises:
telegram.Error
-
ID= 'remoteFile'¶
-
static
read(q: dict, *args) → pytglib.api.types.remote_file.RemoteFile¶
pytglib.api.types.reply_markup module¶
-
class
pytglib.api.types.reply_markup.ReplyMarkup(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains a description of a custom keyboard and actions that can be done with it to quickly reply to bots
No parameters required.
-
ID= 'replyMarkup'¶
-
static
read(q: dict, *args) → ReplyMarkupShowKeyboard or ReplyMarkupInlineKeyboard or ReplyMarkupRemoveKeyboard or ReplyMarkupForceReply¶
-
pytglib.api.types.reply_markup_force_reply module¶
-
class
pytglib.api.types.reply_markup_force_reply.ReplyMarkupForceReply(is_personal, input_field_placeholder, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectInstructs application to force a reply to this message
- Attributes:
- ID (
str):ReplyMarkupForceReply - Args:
- is_personal (
bool): - True, if a forced reply must automatically be shown to the current userFor outgoing messages, specify true to show the forced reply only for the mentioned users and for the target user of a reply
- input_field_placeholder (
str): - If non-empty, the placeholder to be shown in the input field when the reply is active; 0-64 characters
- is_personal (
- Returns:
- ReplyMarkup
- Raises:
telegram.Error
-
ID= 'replyMarkupForceReply'¶
-
static
read(q: dict, *args) → pytglib.api.types.reply_markup_force_reply.ReplyMarkupForceReply¶
pytglib.api.types.reply_markup_inline_keyboard module¶
-
class
pytglib.api.types.reply_markup_inline_keyboard.ReplyMarkupInlineKeyboard(rows, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains an inline keyboard layout
- Attributes:
- ID (
str):ReplyMarkupInlineKeyboard - Args:
- rows (List of List of
telegram.api.types.inlineKeyboardButton): - A list of rows of inline keyboard buttons
- rows (List of List of
- Returns:
- ReplyMarkup
- Raises:
telegram.Error
-
ID= 'replyMarkupInlineKeyboard'¶
-
static
read(q: dict, *args) → pytglib.api.types.reply_markup_inline_keyboard.ReplyMarkupInlineKeyboard¶
pytglib.api.types.reply_markup_remove_keyboard module¶
-
class
pytglib.api.types.reply_markup_remove_keyboard.ReplyMarkupRemoveKeyboard(is_personal, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectInstructs application to remove the keyboard once this message has been received. This kind of keyboard can’t be received in an incoming message; instead, UpdateChatReplyMarkup with message_id == 0 will be sent
- Attributes:
- ID (
str):ReplyMarkupRemoveKeyboard - Args:
- is_personal (
bool): - True, if the keyboard is removed only for the mentioned users or the target user of a reply
- is_personal (
- Returns:
- ReplyMarkup
- Raises:
telegram.Error
-
ID= 'replyMarkupRemoveKeyboard'¶
-
static
read(q: dict, *args) → pytglib.api.types.reply_markup_remove_keyboard.ReplyMarkupRemoveKeyboard¶
pytglib.api.types.reply_markup_show_keyboard module¶
-
class
pytglib.api.types.reply_markup_show_keyboard.ReplyMarkupShowKeyboard(rows, resize_keyboard, one_time, is_personal, input_field_placeholder, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains a custom keyboard layout to quickly reply to bots
- Attributes:
- ID (
str):ReplyMarkupShowKeyboard - Args:
- rows (List of List of
telegram.api.types.keyboardButton): - A list of rows of bot keyboard buttons
- resize_keyboard (
bool): - True, if the application needs to resize the keyboard vertically
- one_time (
bool): - True, if the application needs to hide the keyboard after use
- is_personal (
bool): - True, if the keyboard must automatically be shown to the current userFor outgoing messages, specify true to show the keyboard only for the mentioned users and for the target user of a reply
- input_field_placeholder (
str): - If non-empty, the placeholder to be shown in the input field when the keyboard is active; 0-64 characters
- rows (List of List of
- Returns:
- ReplyMarkup
- Raises:
telegram.Error
-
ID= 'replyMarkupShowKeyboard'¶
-
static
read(q: dict, *args) → pytglib.api.types.reply_markup_show_keyboard.ReplyMarkupShowKeyboard¶
pytglib.api.types.rich_text module¶
-
class
pytglib.api.types.rich_text.RichText(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectDescribes a text object inside an instant-view web page
No parameters required.
-
ID= 'richText'¶
-
static
read(q: dict, *args) → RichTextMarked or RichTextEmailAddress or RichTexts or RichTextUrl or RichTextPlain or RichTextItalic or RichTextSuperscript or RichTextAnchor or RichTextAnchorLink or RichTextIcon or RichTextStrikethrough or RichTextFixed or RichTextUnderline or RichTextSubscript or RichTextReference or RichTextBold or RichTextPhoneNumber¶
-
pytglib.api.types.rich_text_anchor module¶
-
class
pytglib.api.types.rich_text_anchor.RichTextAnchor(name, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectAn anchor
- Attributes:
- ID (
str):RichTextAnchor - Args:
- name (
str): - Anchor name
- name (
- Returns:
- RichText
- Raises:
telegram.Error
-
ID= 'richTextAnchor'¶
-
static
read(q: dict, *args) → pytglib.api.types.rich_text_anchor.RichTextAnchor¶
pytglib.api.types.rich_text_anchor_link module¶
-
class
pytglib.api.types.rich_text_anchor_link.RichTextAnchorLink(text, anchor_name, url, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA link to an anchor on the same web page
- Attributes:
- ID (
str):RichTextAnchorLink - Args:
- text (
telegram.api.types.RichText): - The link text
- anchor_name (
str): - The anchor nameIf the name is empty, the link must bring back to top
- url (
str): - An HTTP URL, opening the anchor
- text (
- Returns:
- RichText
- Raises:
telegram.Error
-
ID= 'richTextAnchorLink'¶
-
static
read(q: dict, *args) → pytglib.api.types.rich_text_anchor_link.RichTextAnchorLink¶
pytglib.api.types.rich_text_bold module¶
-
class
pytglib.api.types.rich_text_bold.RichTextBold(text, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA bold rich text
- Attributes:
- ID (
str):RichTextBold - Args:
- text (
telegram.api.types.RichText): - Text
- text (
- Returns:
- RichText
- Raises:
telegram.Error
-
ID= 'richTextBold'¶
-
static
read(q: dict, *args) → pytglib.api.types.rich_text_bold.RichTextBold¶
pytglib.api.types.rich_text_email_address module¶
-
class
pytglib.api.types.rich_text_email_address.RichTextEmailAddress(text, email_address, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA rich text email link
- Attributes:
- ID (
str):RichTextEmailAddress - Args:
- text (
telegram.api.types.RichText): - Text
- email_address (
str): - Email address
- text (
- Returns:
- RichText
- Raises:
telegram.Error
-
ID= 'richTextEmailAddress'¶
-
static
read(q: dict, *args) → pytglib.api.types.rich_text_email_address.RichTextEmailAddress¶
pytglib.api.types.rich_text_fixed module¶
-
class
pytglib.api.types.rich_text_fixed.RichTextFixed(text, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA fixed-width rich text
- Attributes:
- ID (
str):RichTextFixed - Args:
- text (
telegram.api.types.RichText): - Text
- text (
- Returns:
- RichText
- Raises:
telegram.Error
-
ID= 'richTextFixed'¶
-
static
read(q: dict, *args) → pytglib.api.types.rich_text_fixed.RichTextFixed¶
pytglib.api.types.rich_text_icon module¶
-
class
pytglib.api.types.rich_text_icon.RichTextIcon(document, width, height, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA small image inside the text
- Attributes:
- ID (
str):RichTextIcon - Args:
- document (
telegram.api.types.document): - The image represented as a documentThe image can be in GIF, JPEG or PNG format
- width (
int): - Width of a bounding box in which the image must be shown; 0 if unknown
- height (
int): - Height of a bounding box in which the image must be shown; 0 if unknown
- document (
- Returns:
- RichText
- Raises:
telegram.Error
-
ID= 'richTextIcon'¶
-
static
read(q: dict, *args) → pytglib.api.types.rich_text_icon.RichTextIcon¶
pytglib.api.types.rich_text_italic module¶
-
class
pytglib.api.types.rich_text_italic.RichTextItalic(text, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectAn italicized rich text
- Attributes:
- ID (
str):RichTextItalic - Args:
- text (
telegram.api.types.RichText): - Text
- text (
- Returns:
- RichText
- Raises:
telegram.Error
-
ID= 'richTextItalic'¶
-
static
read(q: dict, *args) → pytglib.api.types.rich_text_italic.RichTextItalic¶
pytglib.api.types.rich_text_marked module¶
-
class
pytglib.api.types.rich_text_marked.RichTextMarked(text, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA marked rich text
- Attributes:
- ID (
str):RichTextMarked - Args:
- text (
telegram.api.types.RichText): - Text
- text (
- Returns:
- RichText
- Raises:
telegram.Error
-
ID= 'richTextMarked'¶
-
static
read(q: dict, *args) → pytglib.api.types.rich_text_marked.RichTextMarked¶
pytglib.api.types.rich_text_phone_number module¶
-
class
pytglib.api.types.rich_text_phone_number.RichTextPhoneNumber(text, phone_number, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA rich text phone number
- Attributes:
- ID (
str):RichTextPhoneNumber - Args:
- text (
telegram.api.types.RichText): - Text
- phone_number (
str): - Phone number
- text (
- Returns:
- RichText
- Raises:
telegram.Error
-
ID= 'richTextPhoneNumber'¶
-
static
read(q: dict, *args) → pytglib.api.types.rich_text_phone_number.RichTextPhoneNumber¶
pytglib.api.types.rich_text_plain module¶
-
class
pytglib.api.types.rich_text_plain.RichTextPlain(text, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA plain text
- Attributes:
- ID (
str):RichTextPlain - Args:
- text (
str): - Text
- text (
- Returns:
- RichText
- Raises:
telegram.Error
-
ID= 'richTextPlain'¶
-
static
read(q: dict, *args) → pytglib.api.types.rich_text_plain.RichTextPlain¶
pytglib.api.types.rich_text_reference module¶
-
class
pytglib.api.types.rich_text_reference.RichTextReference(text, anchor_name, url, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA reference to a richTexts object on the same web page
- Attributes:
- ID (
str):RichTextReference - Args:
- text (
telegram.api.types.RichText): - The text
- anchor_name (
str): - The name of a richTextAnchor object, which is the first element of the target richTexts object
- url (
str): - An HTTP URL, opening the reference
- text (
- Returns:
- RichText
- Raises:
telegram.Error
-
ID= 'richTextReference'¶
-
static
read(q: dict, *args) → pytglib.api.types.rich_text_reference.RichTextReference¶
pytglib.api.types.rich_text_strikethrough module¶
-
class
pytglib.api.types.rich_text_strikethrough.RichTextStrikethrough(text, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA strikethrough rich text
- Attributes:
- ID (
str):RichTextStrikethrough - Args:
- text (
telegram.api.types.RichText): - Text
- text (
- Returns:
- RichText
- Raises:
telegram.Error
-
ID= 'richTextStrikethrough'¶
-
static
read(q: dict, *args) → pytglib.api.types.rich_text_strikethrough.RichTextStrikethrough¶
pytglib.api.types.rich_text_subscript module¶
-
class
pytglib.api.types.rich_text_subscript.RichTextSubscript(text, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA subscript rich text
- Attributes:
- ID (
str):RichTextSubscript - Args:
- text (
telegram.api.types.RichText): - Text
- text (
- Returns:
- RichText
- Raises:
telegram.Error
-
ID= 'richTextSubscript'¶
-
static
read(q: dict, *args) → pytglib.api.types.rich_text_subscript.RichTextSubscript¶
pytglib.api.types.rich_text_superscript module¶
-
class
pytglib.api.types.rich_text_superscript.RichTextSuperscript(text, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA superscript rich text
- Attributes:
- ID (
str):RichTextSuperscript - Args:
- text (
telegram.api.types.RichText): - Text
- text (
- Returns:
- RichText
- Raises:
telegram.Error
-
ID= 'richTextSuperscript'¶
-
static
read(q: dict, *args) → pytglib.api.types.rich_text_superscript.RichTextSuperscript¶
pytglib.api.types.rich_text_underline module¶
-
class
pytglib.api.types.rich_text_underline.RichTextUnderline(text, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectAn underlined rich text
- Attributes:
- ID (
str):RichTextUnderline - Args:
- text (
telegram.api.types.RichText): - Text
- text (
- Returns:
- RichText
- Raises:
telegram.Error
-
ID= 'richTextUnderline'¶
-
static
read(q: dict, *args) → pytglib.api.types.rich_text_underline.RichTextUnderline¶
pytglib.api.types.rich_text_url module¶
-
class
pytglib.api.types.rich_text_url.RichTextUrl(text, url, is_cached, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA rich text URL link
- Attributes:
- ID (
str):RichTextUrl - Args:
- text (
telegram.api.types.RichText): - Text
- url (
str): - URL
- is_cached (
bool): - True, if the URL has cached instant view server-side
- text (
- Returns:
- RichText
- Raises:
telegram.Error
-
ID= 'richTextUrl'¶
-
static
read(q: dict, *args) → pytglib.api.types.rich_text_url.RichTextUrl¶
pytglib.api.types.rich_texts module¶
-
class
pytglib.api.types.rich_texts.RichTexts(texts, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA concatenation of rich texts
- Attributes:
- ID (
str):RichTexts - Args:
- texts (List of
telegram.api.types.RichText): - Texts
- texts (List of
- Returns:
- RichText
- Raises:
telegram.Error
-
ID= 'richTexts'¶
-
static
read(q: dict, *args) → pytglib.api.types.rich_texts.RichTexts¶
pytglib.api.types.saved_credentials module¶
-
class
pytglib.api.types.saved_credentials.SavedCredentials(id, title, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains information about saved card credentials
- Attributes:
- ID (
str):SavedCredentials - Args:
- id (
str): - Unique identifier of the saved credentials
- title (
str): - Title of the saved credentials
- id (
- Returns:
- SavedCredentials
- Raises:
telegram.Error
-
ID= 'savedCredentials'¶
-
static
read(q: dict, *args) → pytglib.api.types.saved_credentials.SavedCredentials¶
pytglib.api.types.scope_notification_settings module¶
-
class
pytglib.api.types.scope_notification_settings.ScopeNotificationSettings(mute_for, sound_id, show_preview, disable_pinned_message_notifications, disable_mention_notifications, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains information about notification settings for several chats
- Attributes:
- ID (
str):ScopeNotificationSettings - Args:
- mute_for (
int): - Time left before notifications will be unmuted, in seconds
- sound_id (
int): - Identifier of the notification sound to be played; 0 if sound is disabled
- show_preview (
bool): - True, if message content must be displayed in notifications
- disable_pinned_message_notifications (
bool): - True, if notifications for incoming pinned messages will be created as for an ordinary unread message
- disable_mention_notifications (
bool): - True, if notifications for messages with mentions will be created as for an ordinary unread message
- mute_for (
- Returns:
- ScopeNotificationSettings
- Raises:
telegram.Error
-
ID= 'scopeNotificationSettings'¶
-
static
read(q: dict, *args) → pytglib.api.types.scope_notification_settings.ScopeNotificationSettings¶
pytglib.api.types.search_messages_filter module¶
-
class
pytglib.api.types.search_messages_filter.SearchMessagesFilter(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents a filter for message search results
No parameters required.
-
ID= 'searchMessagesFilter'¶
-
static
read(q: dict, *args) → SearchMessagesFilterPhotoAndVideo or SearchMessagesFilterUnreadMention or SearchMessagesFilterFailedToSend or SearchMessagesFilterChatPhoto or SearchMessagesFilterVideo or SearchMessagesFilterVideoNote or SearchMessagesFilterAudio or SearchMessagesFilterUnreadReaction or SearchMessagesFilterDocument or SearchMessagesFilterMention or SearchMessagesFilterEmpty or SearchMessagesFilterPinned or SearchMessagesFilterUrl or SearchMessagesFilterVoiceNote or SearchMessagesFilterVoiceAndVideoNote or SearchMessagesFilterAnimation or SearchMessagesFilterPhoto¶
-
pytglib.api.types.search_messages_filter_animation module¶
-
class
pytglib.api.types.search_messages_filter_animation.SearchMessagesFilterAnimation(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectReturns only animation messages
- Attributes:
- ID (
str):SearchMessagesFilterAnimation
No parameters required.
- Returns:
- SearchMessagesFilter
- Raises:
telegram.Error
-
ID= 'searchMessagesFilterAnimation'¶
-
static
read(q: dict, *args) → pytglib.api.types.search_messages_filter_animation.SearchMessagesFilterAnimation¶
pytglib.api.types.search_messages_filter_audio module¶
-
class
pytglib.api.types.search_messages_filter_audio.SearchMessagesFilterAudio(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectReturns only audio messages
- Attributes:
- ID (
str):SearchMessagesFilterAudio
No parameters required.
- Returns:
- SearchMessagesFilter
- Raises:
telegram.Error
-
ID= 'searchMessagesFilterAudio'¶
-
static
read(q: dict, *args) → pytglib.api.types.search_messages_filter_audio.SearchMessagesFilterAudio¶
pytglib.api.types.search_messages_filter_call module¶
pytglib.api.types.search_messages_filter_chat_photo module¶
-
class
pytglib.api.types.search_messages_filter_chat_photo.SearchMessagesFilterChatPhoto(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectReturns only messages containing chat photos
- Attributes:
- ID (
str):SearchMessagesFilterChatPhoto
No parameters required.
- Returns:
- SearchMessagesFilter
- Raises:
telegram.Error
-
ID= 'searchMessagesFilterChatPhoto'¶
-
static
read(q: dict, *args) → pytglib.api.types.search_messages_filter_chat_photo.SearchMessagesFilterChatPhoto¶
pytglib.api.types.search_messages_filter_document module¶
-
class
pytglib.api.types.search_messages_filter_document.SearchMessagesFilterDocument(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectReturns only document messages
- Attributes:
- ID (
str):SearchMessagesFilterDocument
No parameters required.
- Returns:
- SearchMessagesFilter
- Raises:
telegram.Error
-
ID= 'searchMessagesFilterDocument'¶
-
static
read(q: dict, *args) → pytglib.api.types.search_messages_filter_document.SearchMessagesFilterDocument¶
pytglib.api.types.search_messages_filter_empty module¶
-
class
pytglib.api.types.search_messages_filter_empty.SearchMessagesFilterEmpty(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectReturns all found messages, no filter is applied
- Attributes:
- ID (
str):SearchMessagesFilterEmpty
No parameters required.
- Returns:
- SearchMessagesFilter
- Raises:
telegram.Error
-
ID= 'searchMessagesFilterEmpty'¶
-
static
read(q: dict, *args) → pytglib.api.types.search_messages_filter_empty.SearchMessagesFilterEmpty¶
pytglib.api.types.search_messages_filter_mention module¶
-
class
pytglib.api.types.search_messages_filter_mention.SearchMessagesFilterMention(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectReturns only messages with mentions of the current user, or messages that are replies to their messages
- Attributes:
- ID (
str):SearchMessagesFilterMention
No parameters required.
- Returns:
- SearchMessagesFilter
- Raises:
telegram.Error
-
ID= 'searchMessagesFilterMention'¶
-
static
read(q: dict, *args) → pytglib.api.types.search_messages_filter_mention.SearchMessagesFilterMention¶
pytglib.api.types.search_messages_filter_missed_call module¶
pytglib.api.types.search_messages_filter_photo module¶
-
class
pytglib.api.types.search_messages_filter_photo.SearchMessagesFilterPhoto(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectReturns only photo messages
- Attributes:
- ID (
str):SearchMessagesFilterPhoto
No parameters required.
- Returns:
- SearchMessagesFilter
- Raises:
telegram.Error
-
ID= 'searchMessagesFilterPhoto'¶
-
static
read(q: dict, *args) → pytglib.api.types.search_messages_filter_photo.SearchMessagesFilterPhoto¶
pytglib.api.types.search_messages_filter_photo_and_video module¶
-
class
pytglib.api.types.search_messages_filter_photo_and_video.SearchMessagesFilterPhotoAndVideo(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectReturns only photo and video messages
- Attributes:
- ID (
str):SearchMessagesFilterPhotoAndVideo
No parameters required.
- Returns:
- SearchMessagesFilter
- Raises:
telegram.Error
-
ID= 'searchMessagesFilterPhotoAndVideo'¶
-
static
read(q: dict, *args) → pytglib.api.types.search_messages_filter_photo_and_video.SearchMessagesFilterPhotoAndVideo¶
pytglib.api.types.search_messages_filter_unread_mention module¶
-
class
pytglib.api.types.search_messages_filter_unread_mention.SearchMessagesFilterUnreadMention(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectReturns only messages with unread mentions of the current user, or messages that are replies to their messages. When using this filter the results can’t be additionally filtered by a query, a message thread or by the sending user
- Attributes:
- ID (
str):SearchMessagesFilterUnreadMention
No parameters required.
- Returns:
- SearchMessagesFilter
- Raises:
telegram.Error
-
ID= 'searchMessagesFilterUnreadMention'¶
-
static
read(q: dict, *args) → pytglib.api.types.search_messages_filter_unread_mention.SearchMessagesFilterUnreadMention¶
pytglib.api.types.search_messages_filter_url module¶
-
class
pytglib.api.types.search_messages_filter_url.SearchMessagesFilterUrl(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectReturns only messages containing URLs
- Attributes:
- ID (
str):SearchMessagesFilterUrl
No parameters required.
- Returns:
- SearchMessagesFilter
- Raises:
telegram.Error
-
ID= 'searchMessagesFilterUrl'¶
-
static
read(q: dict, *args) → pytglib.api.types.search_messages_filter_url.SearchMessagesFilterUrl¶
pytglib.api.types.search_messages_filter_video module¶
-
class
pytglib.api.types.search_messages_filter_video.SearchMessagesFilterVideo(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectReturns only video messages
- Attributes:
- ID (
str):SearchMessagesFilterVideo
No parameters required.
- Returns:
- SearchMessagesFilter
- Raises:
telegram.Error
-
ID= 'searchMessagesFilterVideo'¶
-
static
read(q: dict, *args) → pytglib.api.types.search_messages_filter_video.SearchMessagesFilterVideo¶
pytglib.api.types.search_messages_filter_video_note module¶
-
class
pytglib.api.types.search_messages_filter_video_note.SearchMessagesFilterVideoNote(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectReturns only video note messages
- Attributes:
- ID (
str):SearchMessagesFilterVideoNote
No parameters required.
- Returns:
- SearchMessagesFilter
- Raises:
telegram.Error
-
ID= 'searchMessagesFilterVideoNote'¶
-
static
read(q: dict, *args) → pytglib.api.types.search_messages_filter_video_note.SearchMessagesFilterVideoNote¶
pytglib.api.types.search_messages_filter_voice_and_video_note module¶
-
class
pytglib.api.types.search_messages_filter_voice_and_video_note.SearchMessagesFilterVoiceAndVideoNote(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectReturns only voice and video note messages
- Attributes:
- ID (
str):SearchMessagesFilterVoiceAndVideoNote
No parameters required.
- Returns:
- SearchMessagesFilter
- Raises:
telegram.Error
-
ID= 'searchMessagesFilterVoiceAndVideoNote'¶
-
static
read(q: dict, *args) → pytglib.api.types.search_messages_filter_voice_and_video_note.SearchMessagesFilterVoiceAndVideoNote¶
pytglib.api.types.search_messages_filter_voice_note module¶
-
class
pytglib.api.types.search_messages_filter_voice_note.SearchMessagesFilterVoiceNote(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectReturns only voice note messages
- Attributes:
- ID (
str):SearchMessagesFilterVoiceNote
No parameters required.
- Returns:
- SearchMessagesFilter
- Raises:
telegram.Error
-
ID= 'searchMessagesFilterVoiceNote'¶
-
static
read(q: dict, *args) → pytglib.api.types.search_messages_filter_voice_note.SearchMessagesFilterVoiceNote¶
pytglib.api.types.seconds module¶
-
class
pytglib.api.types.seconds.Seconds(seconds, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains a value representing a number of seconds
- Attributes:
- ID (
str):Seconds - Args:
- seconds (
float): - Number of seconds
- seconds (
- Returns:
- Seconds
- Raises:
telegram.Error
-
ID= 'seconds'¶
-
static
read(q: dict, *args) → pytglib.api.types.seconds.Seconds¶
pytglib.api.types.secret_chat module¶
-
class
pytglib.api.types.secret_chat.SecretChat(id, user_id, state, is_outbound, key_hash, layer, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents a secret chat
- Attributes:
- ID (
str):SecretChat - Args:
- id (
int): - Secret chat identifier
- user_id (
int): - Identifier of the chat partner
- state (
telegram.api.types.SecretChatState): - State of the secret chat
- is_outbound (
bool): - True, if the chat was created by the current user; otherwise false
- key_hash (
bytes): - Hash of the currently used key for comparison with the hash of the chat partner’s keyThis is a string of 36 little-endian bytes, which must be split into groups of 2 bits, each denoting a pixel of one of 4 colors FFFFFF, D5E6F3, 2D5775, and 2F99C9The pixels must be used to make a 12x12 square image filled from left to right, top to bottomAlternatively, the first 32 bytes of the hash can be converted to the hexadecimal format and printed as 32 2-digit hex numbers
- layer (
int): - Secret chat layer; determines features supported by the chat partner’s applicationNested text entities and underline and strikethrough entities are supported if the layer >= 101, files bigger than 2000MB are supported if the layer >= 143
- id (
- Returns:
- SecretChat
- Raises:
telegram.Error
-
ID= 'secretChat'¶
-
static
read(q: dict, *args) → pytglib.api.types.secret_chat.SecretChat¶
pytglib.api.types.secret_chat_state module¶
-
class
pytglib.api.types.secret_chat_state.SecretChatState(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectDescribes the current secret chat state
No parameters required.
-
ID= 'secretChatState'¶
-
static
read(q: dict, *args) → SecretChatStatePending or SecretChatStateClosed or SecretChatStateReady¶
-
pytglib.api.types.secret_chat_state_closed module¶
-
class
pytglib.api.types.secret_chat_state_closed.SecretChatStateClosed(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe secret chat is closed
- Attributes:
- ID (
str):SecretChatStateClosed
No parameters required.
- Returns:
- SecretChatState
- Raises:
telegram.Error
-
ID= 'secretChatStateClosed'¶
-
static
read(q: dict, *args) → pytglib.api.types.secret_chat_state_closed.SecretChatStateClosed¶
pytglib.api.types.secret_chat_state_pending module¶
-
class
pytglib.api.types.secret_chat_state_pending.SecretChatStatePending(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe secret chat is not yet created; waiting for the other user to get online
- Attributes:
- ID (
str):SecretChatStatePending
No parameters required.
- Returns:
- SecretChatState
- Raises:
telegram.Error
-
ID= 'secretChatStatePending'¶
-
static
read(q: dict, *args) → pytglib.api.types.secret_chat_state_pending.SecretChatStatePending¶
pytglib.api.types.secret_chat_state_ready module¶
-
class
pytglib.api.types.secret_chat_state_ready.SecretChatStateReady(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe secret chat is ready to use
- Attributes:
- ID (
str):SecretChatStateReady
No parameters required.
- Returns:
- SecretChatState
- Raises:
telegram.Error
-
ID= 'secretChatStateReady'¶
-
static
read(q: dict, *args) → pytglib.api.types.secret_chat_state_ready.SecretChatStateReady¶
pytglib.api.types.send_message_options module¶
pytglib.api.types.session module¶
-
class
pytglib.api.types.session.Session(id, is_current, is_password_pending, can_accept_secret_chats, can_accept_calls, type, api_id, application_name, application_version, is_official_application, device_model, platform, system_version, log_in_date, last_active_date, ip, country, region, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains information about one session in a Telegram application used by the current user. Sessions must be shown to the user in the returned order
- Attributes:
- ID (
str):Session - Args:
- id (
int): - Session identifier
- is_current (
bool): - True, if this session is the current session
- is_password_pending (
bool): - True, if a password is needed to complete authorization of the session
- can_accept_secret_chats (
bool): - True, if incoming secret chats can be accepted by the session
- can_accept_calls (
bool): - True, if incoming calls can be accepted by the session
- type (
telegram.api.types.SessionType): - Session type based on the system and application version, which can be used to display a corresponding icon
- api_id (
int): - Telegram API identifier, as provided by the application
- application_name (
str): - Name of the application, as provided by the application
- application_version (
str): - The version of the application, as provided by the application
- is_official_application (
bool): - True, if the application is an official application or uses the api_id of an official application
- device_model (
str): - Model of the device the application has been run or is running on, as provided by the application
- platform (
str): - Operating system the application has been run or is running on, as provided by the application
- system_version (
str): - Version of the operating system the application has been run or is running on, as provided by the application
- log_in_date (
int): - Point in time (Unix timestamp) when the user has logged in
- last_active_date (
int): - Point in time (Unix timestamp) when the session was last used
- ip (
str): - IP address from which the session was created, in human-readable format
- country (
str): - A two-letter country code for the country from which the session was created, based on the IP address
- region (
str): - Region code from which the session was created, based on the IP address
- id (
- Returns:
- Session
- Raises:
telegram.Error
-
ID= 'session'¶
-
static
read(q: dict, *args) → pytglib.api.types.session.Session¶
pytglib.api.types.sessions module¶
-
class
pytglib.api.types.sessions.Sessions(sessions, inactive_session_ttl_days, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains a list of sessions
- Attributes:
- ID (
str):Sessions - Args:
- sessions (List of
telegram.api.types.session): - List of sessions
- inactive_session_ttl_days (
int): - Number of days of inactivity before sessions will automatically be terminated; 1-366 days
- sessions (List of
- Returns:
- Sessions
- Raises:
telegram.Error
-
ID= 'sessions'¶
-
static
read(q: dict, *args) → pytglib.api.types.sessions.Sessions¶
pytglib.api.types.shipping_option module¶
-
class
pytglib.api.types.shipping_option.ShippingOption(id, title, price_parts, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectOne shipping option
- Attributes:
- ID (
str):ShippingOption - Args:
- id (
str): - Shipping option identifier
- title (
str): - Option title
- price_parts (List of
telegram.api.types.labeledPricePart): - A list of objects used to calculate the total shipping costs
- id (
- Returns:
- ShippingOption
- Raises:
telegram.Error
-
ID= 'shippingOption'¶
-
static
read(q: dict, *args) → pytglib.api.types.shipping_option.ShippingOption¶
pytglib.api.types.statistics_graph module¶
pytglib.api.types.statistics_graph_async module¶
pytglib.api.types.statistics_graph_data module¶
pytglib.api.types.statistics_graph_error module¶
pytglib.api.types.statistics_value module¶
pytglib.api.types.sticker module¶
-
class
pytglib.api.types.sticker.Sticker(set_id, width, height, emoji, type, outline, thumbnail, premium_animation, sticker, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectDescribes a sticker
- Attributes:
- ID (
str):Sticker - Args:
- set_id (
int): - The identifier of the sticker set to which the sticker belongs; 0 if none
- width (
int): - Sticker width; as defined by the sender
- height (
int): - Sticker height; as defined by the sender
- emoji (
str): - Emoji corresponding to the sticker
- type (
telegram.api.types.StickerType): - Sticker type
- outline (List of
telegram.api.types.closedVectorPath): - Sticker’s outline represented as a list of closed vector paths; may be emptyThe coordinate system origin is in the upper-left corner
- thumbnail (
telegram.api.types.thumbnail): - Sticker thumbnail in WEBP or JPEG format; may be null
- premium_animation (
telegram.api.types.file): - Premium animation of the sticker; may be nullIf present, only Premium users can send the sticker
- sticker (
telegram.api.types.file): - File containing the sticker
- set_id (
- Returns:
- Sticker
- Raises:
telegram.Error
-
ID= 'sticker'¶
-
static
read(q: dict, *args) → pytglib.api.types.sticker.Sticker¶
pytglib.api.types.sticker_set module¶
-
class
pytglib.api.types.sticker_set.StickerSet(id, title, name, thumbnail, thumbnail_outline, is_installed, is_archived, is_official, sticker_type, is_viewed, stickers, emojis, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents a sticker set
- Attributes:
- ID (
str):StickerSet - Args:
- id (
int): - Identifier of the sticker set
- title (
str): - Title of the sticker set
- name (
str): - Name of the sticker set
- thumbnail (
telegram.api.types.thumbnail): - Sticker set thumbnail in WEBP, TGS, or WEBM format with width and height 100; may be nullThe file can be downloaded only before the thumbnail is changed
- thumbnail_outline (List of
telegram.api.types.closedVectorPath): - Sticker set thumbnail’s outline represented as a list of closed vector paths; may be emptyThe coordinate system origin is in the upper-left corner
- is_installed (
bool): - True, if the sticker set has been installed by the current user
- is_archived (
bool): - True, if the sticker set has been archivedA sticker set can’t be installed and archived simultaneously
- is_official (
bool): - True, if the sticker set is official
- sticker_type (
telegram.api.types.StickerType): - Type of the stickers in the set
- is_viewed (
bool): - True for already viewed trending sticker sets
- stickers (List of
telegram.api.types.sticker): - List of stickers in this set
- emojis (List of
telegram.api.types.emojis): - A list of emoji corresponding to the stickers in the same orderThe list is only for informational purposes, because a sticker is always sent with a fixed emoji from the corresponding Sticker object
- id (
- Returns:
- StickerSet
- Raises:
telegram.Error
-
ID= 'stickerSet'¶
-
static
read(q: dict, *args) → pytglib.api.types.sticker_set.StickerSet¶
pytglib.api.types.sticker_set_info module¶
-
class
pytglib.api.types.sticker_set_info.StickerSetInfo(id, title, name, thumbnail, thumbnail_outline, is_installed, is_archived, is_official, sticker_type, is_viewed, size, covers, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents short information about a sticker set
- Attributes:
- ID (
str):StickerSetInfo - Args:
- id (
int): - Identifier of the sticker set
- title (
str): - Title of the sticker set
- name (
str): - Name of the sticker set
- thumbnail (
telegram.api.types.thumbnail): - Sticker set thumbnail in WEBP, TGS, or WEBM format with width and height 100; may be null
- thumbnail_outline (List of
telegram.api.types.closedVectorPath): - Sticker set thumbnail’s outline represented as a list of closed vector paths; may be emptyThe coordinate system origin is in the upper-left corner
- is_installed (
bool): - True, if the sticker set has been installed by the current user
- is_archived (
bool): - True, if the sticker set has been archivedA sticker set can’t be installed and archived simultaneously
- is_official (
bool): - True, if the sticker set is official
- sticker_type (
telegram.api.types.StickerType): - Type of the stickers in the set
- is_viewed (
bool): - True for already viewed trending sticker sets
- size (
int): - Total number of stickers in the set
- covers (List of
telegram.api.types.sticker): - Up to the first 5 stickers from the set, depending on the contextIf the application needs more stickers the full sticker set needs to be requested
- id (
- Returns:
- StickerSetInfo
- Raises:
telegram.Error
-
ID= 'stickerSetInfo'¶
-
static
read(q: dict, *args) → pytglib.api.types.sticker_set_info.StickerSetInfo¶
pytglib.api.types.sticker_sets module¶
-
class
pytglib.api.types.sticker_sets.StickerSets(total_count, sets, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents a list of sticker sets
- Attributes:
- ID (
str):StickerSets - Args:
- total_count (
int): - Approximate total number of sticker sets found
- sets (List of
telegram.api.types.stickerSetInfo): - List of sticker sets
- total_count (
- Returns:
- StickerSets
- Raises:
telegram.Error
-
ID= 'stickerSets'¶
-
static
read(q: dict, *args) → pytglib.api.types.sticker_sets.StickerSets¶
pytglib.api.types.stickers module¶
-
class
pytglib.api.types.stickers.Stickers(stickers, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents a list of stickers
- Attributes:
- ID (
str):Stickers - Args:
- stickers (List of
telegram.api.types.sticker): - List of stickers
- stickers (List of
- Returns:
- Stickers
- Raises:
telegram.Error
-
ID= 'stickers'¶
-
static
read(q: dict, *args) → pytglib.api.types.stickers.Stickers¶
pytglib.api.types.storage_statistics module¶
-
class
pytglib.api.types.storage_statistics.StorageStatistics(size, count, by_chat, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains the exact storage usage statistics split by chats and file type
- Attributes:
- ID (
str):StorageStatistics - Args:
- size (
int): - Total size of files, in bytes
- count (
int): - Total number of files
- by_chat (List of
telegram.api.types.storageStatisticsByChat): - Statistics split by chats
- size (
- Returns:
- StorageStatistics
- Raises:
telegram.Error
-
ID= 'storageStatistics'¶
-
static
read(q: dict, *args) → pytglib.api.types.storage_statistics.StorageStatistics¶
pytglib.api.types.storage_statistics_by_chat module¶
-
class
pytglib.api.types.storage_statistics_by_chat.StorageStatisticsByChat(chat_id, size, count, by_file_type, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains the storage usage statistics for a specific chat
- Attributes:
- ID (
str):StorageStatisticsByChat - Args:
- chat_id (
int): - Chat identifier; 0 if none
- size (
int): - Total size of the files in the chat, in bytes
- count (
int): - Total number of files in the chat
- by_file_type (List of
telegram.api.types.storageStatisticsByFileType): - Statistics split by file types
- chat_id (
- Returns:
- StorageStatisticsByChat
- Raises:
telegram.Error
-
ID= 'storageStatisticsByChat'¶
-
static
read(q: dict, *args) → pytglib.api.types.storage_statistics_by_chat.StorageStatisticsByChat¶
pytglib.api.types.storage_statistics_by_file_type module¶
-
class
pytglib.api.types.storage_statistics_by_file_type.StorageStatisticsByFileType(file_type, size, count, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains the storage usage statistics for a specific file type
- Attributes:
- ID (
str):StorageStatisticsByFileType - Args:
- file_type (
telegram.api.types.FileType): - File type
- size (
int): - Total size of the files, in bytes
- count (
int): - Total number of files
- file_type (
- Returns:
- StorageStatisticsByFileType
- Raises:
telegram.Error
-
ID= 'storageStatisticsByFileType'¶
-
static
read(q: dict, *args) → pytglib.api.types.storage_statistics_by_file_type.StorageStatisticsByFileType¶
pytglib.api.types.storage_statistics_fast module¶
-
class
pytglib.api.types.storage_statistics_fast.StorageStatisticsFast(files_size, file_count, database_size, language_pack_database_size, log_size, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains approximate storage usage statistics, excluding files of unknown file type
- Attributes:
- ID (
str):StorageStatisticsFast - Args:
- files_size (
int): - Approximate total size of files, in bytes
- file_count (
int): - Approximate number of files
- database_size (
int): - Size of the database
- language_pack_database_size (
int): - Size of the language pack database
- log_size (
int): - Size of the TDLib internal log
- files_size (
- Returns:
- StorageStatisticsFast
- Raises:
telegram.Error
-
ID= 'storageStatisticsFast'¶
-
static
read(q: dict, *args) → pytglib.api.types.storage_statistics_fast.StorageStatisticsFast¶
pytglib.api.types.supergroup module¶
-
class
pytglib.api.types.supergroup.Supergroup(id, username, date, status, member_count, has_linked_chat, has_location, sign_messages, join_to_send_messages, join_by_request, is_slow_mode_enabled, is_channel, is_broadcast_group, is_verified, restriction_reason, is_scam, is_fake, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents a supergroup or channel with zero or more members (subscribers in the case of channels). From the point of view of the system, a channel is a special kind of a supergroup: only administrators can post and see the list of members, and posts from all administrators use the name and photo of the channel instead of individual names and profile photos. Unlike supergroups, channels can have an unlimited number of subscribers
- Attributes:
- ID (
str):Supergroup - Args:
- id (
int): - Supergroup or channel identifier
- username (
str): - Username of the supergroup or channel; empty for private supergroups or channels
- date (
int): - Point in time (Unix timestamp) when the current user joined, or the point in time when the supergroup or channel was created, in case the user is not a member
- status (
telegram.api.types.ChatMemberStatus): - Status of the current user in the supergroup or channel; custom title will be always empty
- member_count (
int): - Number of members in the supergroup or channel; 0 if unknownCurrently, it is guaranteed to be known only if the supergroup or channel was received through searchPublicChats, searchChatsNearby, getInactiveSupergroupChats, getSuitableDiscussionChats, getGroupsInCommon, or getUserPrivacySettingRules
- has_linked_chat (
bool): - True, if the channel has a discussion group, or the supergroup is the designated discussion group for a channel
- has_location (
bool): - True, if the supergroup is connected to a location, iethe supergroup is a location-based supergroup
- sign_messages (
bool): - True, if messages sent to the channel need to contain information about the senderThis field is only applicable to channels
- join_to_send_messages (
bool): - True, if users need to join the supergroup before they can send messagesAlways true for channels and non-discussion supergroups
- join_by_request (
bool): - True, if all users directly joining the supergroup need to be approved by supergroup administratorsAlways false for channels and supergroups without username, location, or a linked chat
- is_slow_mode_enabled (
bool): - True, if the slow mode is enabled in the supergroup
- is_channel (
bool): - True, if the supergroup is a channel
- is_broadcast_group (
bool): - True, if the supergroup is a broadcast group, ieonly administrators can send messages and there is no limit on the number of members
- is_verified (
bool): - True, if the supergroup or channel is verified
- restriction_reason (
str): - If non-empty, contains a human-readable description of the reason why access to this supergroup or channel must be restricted
- is_scam (
bool): - True, if many users reported this supergroup or channel as a scam
- is_fake (
bool): - True, if many users reported this supergroup or channel as a fake account
- id (
- Returns:
- Supergroup
- Raises:
telegram.Error
-
ID= 'supergroup'¶
-
static
read(q: dict, *args) → pytglib.api.types.supergroup.Supergroup¶
pytglib.api.types.supergroup_full_info module¶
-
class
pytglib.api.types.supergroup_full_info.SupergroupFullInfo(photo, description, member_count, administrator_count, restricted_count, banned_count, linked_chat_id, slow_mode_delay, slow_mode_delay_expires_in, can_get_members, can_set_username, can_set_sticker_set, can_set_location, can_get_statistics, is_all_history_available, sticker_set_id, location, invite_link, bot_commands, upgraded_from_basic_group_id, upgraded_from_max_message_id, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains full information about a supergroup or channel
- Attributes:
- ID (
str):SupergroupFullInfo - Args:
- photo (
telegram.api.types.chatPhoto): - Chat photo; may be null
- description (
str): - Supergroup or channel description
- member_count (
int): - Number of members in the supergroup or channel; 0 if unknown
- administrator_count (
int): - Number of privileged users in the supergroup or channel; 0 if unknown
- restricted_count (
int): - Number of restricted users in the supergroup; 0 if unknown
- banned_count (
int): - Number of users banned from chat; 0 if unknown
- linked_chat_id (
int): - Chat identifier of a discussion group for the channel, or a channel, for which the supergroup is the designated discussion group; 0 if none or unknown
- slow_mode_delay (
int): - Delay between consecutive sent messages for non-administrator supergroup members, in seconds
- slow_mode_delay_expires_in (
float): - Time left before next message can be sent in the supergroup, in secondsAn updateSupergroupFullInfo update is not triggered when value of this field changes, but both new and old values are non-zero
- can_get_members (
bool): - True, if members of the chat can be retrieved
- can_set_username (
bool): - True, if the chat username can be changed
- can_set_sticker_set (
bool): - True, if the supergroup sticker set can be changed
- can_set_location (
bool): - True, if the supergroup location can be changed
- can_get_statistics (
bool): - True, if the supergroup or channel statistics are available
- is_all_history_available (
bool): - True, if new chat members will have access to old messagesIn public or discussion groups and both public and private channels, old messages are always available, so this option affects only private supergroups without a linked chatThe value of this field is only available for chat administrators
- sticker_set_id (
int): - Identifier of the supergroup sticker set; 0 if none
- location (
telegram.api.types.chatLocation): - Location to which the supergroup is connected; may be null
- invite_link (
telegram.api.types.chatInviteLink): - Primary invite link for the chat; may be nullFor chat administrators with can_invite_users right only
- bot_commands (List of
telegram.api.types.botCommands): - List of commands of bots in the group
- upgraded_from_basic_group_id (
int): - Identifier of the basic group from which supergroup was upgraded; 0 if none
- upgraded_from_max_message_id (
int): - Identifier of the last message in the basic group from which supergroup was upgraded; 0 if none
- photo (
- Returns:
- SupergroupFullInfo
- Raises:
telegram.Error
-
ID= 'supergroupFullInfo'¶
-
static
read(q: dict, *args) → pytglib.api.types.supergroup_full_info.SupergroupFullInfo¶
pytglib.api.types.supergroup_members_filter module¶
-
class
pytglib.api.types.supergroup_members_filter.SupergroupMembersFilter(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectSpecifies the kind of chat members to return in getSupergroupMembers
No parameters required.
-
ID= 'supergroupMembersFilter'¶
-
static
read(q: dict, *args) → SupergroupMembersFilterRestricted or SupergroupMembersFilterBanned or SupergroupMembersFilterAdministrators or SupergroupMembersFilterBots or SupergroupMembersFilterContacts or SupergroupMembersFilterMention or SupergroupMembersFilterRecent or SupergroupMembersFilterSearch¶
-
pytglib.api.types.supergroup_members_filter_administrators module¶
-
class
pytglib.api.types.supergroup_members_filter_administrators.SupergroupMembersFilterAdministrators(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectReturns the owner and administrators
- Attributes:
- ID (
str):SupergroupMembersFilterAdministrators
No parameters required.
- Returns:
- SupergroupMembersFilter
- Raises:
telegram.Error
-
ID= 'supergroupMembersFilterAdministrators'¶
-
static
read(q: dict, *args) → pytglib.api.types.supergroup_members_filter_administrators.SupergroupMembersFilterAdministrators¶
pytglib.api.types.supergroup_members_filter_banned module¶
-
class
pytglib.api.types.supergroup_members_filter_banned.SupergroupMembersFilterBanned(query, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectReturns users banned from the supergroup or channel; can be used only by administrators
- Attributes:
- ID (
str):SupergroupMembersFilterBanned - Args:
- query (
str): - Query to search for
- query (
- Returns:
- SupergroupMembersFilter
- Raises:
telegram.Error
-
ID= 'supergroupMembersFilterBanned'¶
-
static
read(q: dict, *args) → pytglib.api.types.supergroup_members_filter_banned.SupergroupMembersFilterBanned¶
pytglib.api.types.supergroup_members_filter_bots module¶
-
class
pytglib.api.types.supergroup_members_filter_bots.SupergroupMembersFilterBots(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectReturns bot members of the supergroup or channel
- Attributes:
- ID (
str):SupergroupMembersFilterBots
No parameters required.
- Returns:
- SupergroupMembersFilter
- Raises:
telegram.Error
-
ID= 'supergroupMembersFilterBots'¶
-
static
read(q: dict, *args) → pytglib.api.types.supergroup_members_filter_bots.SupergroupMembersFilterBots¶
pytglib.api.types.supergroup_members_filter_contacts module¶
-
class
pytglib.api.types.supergroup_members_filter_contacts.SupergroupMembersFilterContacts(query, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectReturns contacts of the user, which are members of the supergroup or channel
- Attributes:
- ID (
str):SupergroupMembersFilterContacts - Args:
- query (
str): - Query to search for
- query (
- Returns:
- SupergroupMembersFilter
- Raises:
telegram.Error
-
ID= 'supergroupMembersFilterContacts'¶
-
static
read(q: dict, *args) → pytglib.api.types.supergroup_members_filter_contacts.SupergroupMembersFilterContacts¶
pytglib.api.types.supergroup_members_filter_recent module¶
-
class
pytglib.api.types.supergroup_members_filter_recent.SupergroupMembersFilterRecent(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectReturns recently active users in reverse chronological order
- Attributes:
- ID (
str):SupergroupMembersFilterRecent
No parameters required.
- Returns:
- SupergroupMembersFilter
- Raises:
telegram.Error
-
ID= 'supergroupMembersFilterRecent'¶
-
static
read(q: dict, *args) → pytglib.api.types.supergroup_members_filter_recent.SupergroupMembersFilterRecent¶
pytglib.api.types.supergroup_members_filter_restricted module¶
-
class
pytglib.api.types.supergroup_members_filter_restricted.SupergroupMembersFilterRestricted(query, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectReturns restricted supergroup members; can be used only by administrators
- Attributes:
- ID (
str):SupergroupMembersFilterRestricted - Args:
- query (
str): - Query to search for
- query (
- Returns:
- SupergroupMembersFilter
- Raises:
telegram.Error
-
ID= 'supergroupMembersFilterRestricted'¶
-
static
read(q: dict, *args) → pytglib.api.types.supergroup_members_filter_restricted.SupergroupMembersFilterRestricted¶
pytglib.api.types.supergroup_members_filter_search module¶
-
class
pytglib.api.types.supergroup_members_filter_search.SupergroupMembersFilterSearch(query, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectUsed to search for supergroup or channel members via a (string) query
- Attributes:
- ID (
str):SupergroupMembersFilterSearch - Args:
- query (
str): - Query to search for
- query (
- Returns:
- SupergroupMembersFilter
- Raises:
telegram.Error
-
ID= 'supergroupMembersFilterSearch'¶
-
static
read(q: dict, *args) → pytglib.api.types.supergroup_members_filter_search.SupergroupMembersFilterSearch¶
pytglib.api.types.t_me_url module¶
-
class
pytglib.api.types.t_me_url.TMeUrl(url, type, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents a URL linking to an internal Telegram entity
- Attributes:
- ID (
str):TMeUrl - Args:
- url (
str): - URL
- type (
telegram.api.types.TMeUrlType): - Type of the URL
- url (
- Returns:
- TMeUrl
- Raises:
telegram.Error
-
ID= 'tMeUrl'¶
-
static
read(q: dict, *args) → pytglib.api.types.t_me_url.TMeUrl¶
pytglib.api.types.t_me_url_type module¶
-
class
pytglib.api.types.t_me_url_type.TMeUrlType(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectDescribes the type of a URL linking to an internal Telegram entity
No parameters required.
-
ID= 'tMeUrlType'¶
-
static
read(q: dict, *args) → TMeUrlTypeStickerSet or TMeUrlTypeSupergroup or TMeUrlTypeUser or TMeUrlTypeChatInvite¶
-
pytglib.api.types.t_me_url_type_chat_invite module¶
-
class
pytglib.api.types.t_me_url_type_chat_invite.TMeUrlTypeChatInvite(info, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA chat invite link
- Attributes:
- ID (
str):TMeUrlTypeChatInvite - Args:
- info (
telegram.api.types.chatInviteLinkInfo): - Information about the chat invite link
- info (
- Returns:
- TMeUrlType
- Raises:
telegram.Error
-
ID= 'tMeUrlTypeChatInvite'¶
-
static
read(q: dict, *args) → pytglib.api.types.t_me_url_type_chat_invite.TMeUrlTypeChatInvite¶
pytglib.api.types.t_me_url_type_sticker_set module¶
-
class
pytglib.api.types.t_me_url_type_sticker_set.TMeUrlTypeStickerSet(sticker_set_id, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA URL linking to a sticker set
- Attributes:
- ID (
str):TMeUrlTypeStickerSet - Args:
- sticker_set_id (
int): - Identifier of the sticker set
- sticker_set_id (
- Returns:
- TMeUrlType
- Raises:
telegram.Error
-
ID= 'tMeUrlTypeStickerSet'¶
-
static
read(q: dict, *args) → pytglib.api.types.t_me_url_type_sticker_set.TMeUrlTypeStickerSet¶
pytglib.api.types.t_me_url_type_supergroup module¶
-
class
pytglib.api.types.t_me_url_type_supergroup.TMeUrlTypeSupergroup(supergroup_id, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA URL linking to a public supergroup or channel
- Attributes:
- ID (
str):TMeUrlTypeSupergroup - Args:
- supergroup_id (
int): - Identifier of the supergroup or channel
- supergroup_id (
- Returns:
- TMeUrlType
- Raises:
telegram.Error
-
ID= 'tMeUrlTypeSupergroup'¶
-
static
read(q: dict, *args) → pytglib.api.types.t_me_url_type_supergroup.TMeUrlTypeSupergroup¶
pytglib.api.types.t_me_url_type_user module¶
-
class
pytglib.api.types.t_me_url_type_user.TMeUrlTypeUser(user_id, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA URL linking to a user
- Attributes:
- ID (
str):TMeUrlTypeUser - Args:
- user_id (
int): - Identifier of the user
- user_id (
- Returns:
- TMeUrlType
- Raises:
telegram.Error
-
ID= 'tMeUrlTypeUser'¶
-
static
read(q: dict, *args) → pytglib.api.types.t_me_url_type_user.TMeUrlTypeUser¶
pytglib.api.types.t_me_urls module¶
-
class
pytglib.api.types.t_me_urls.TMeUrls(urls, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains a list of t.me URLs
- Attributes:
- ID (
str):TMeUrls - Args:
- urls (List of
telegram.api.types.tMeUrl): - List of URLs
- urls (List of
- Returns:
- TMeUrls
- Raises:
telegram.Error
-
ID= 'tMeUrls'¶
-
static
read(q: dict, *args) → pytglib.api.types.t_me_urls.TMeUrls¶
pytglib.api.types.tdlib_parameters module¶
-
class
pytglib.api.types.tdlib_parameters.TdlibParameters(use_test_dc, database_directory, files_directory, use_file_database, use_chat_info_database, use_message_database, use_secret_chats, api_id, api_hash, system_language_code, device_model, system_version, application_version, enable_storage_optimizer, ignore_file_names, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains parameters for TDLib initialization
- Attributes:
- ID (
str):TdlibParameters - Args:
- use_test_dc (
bool): - If set to true, the Telegram test environment will be used instead of the production environment
- database_directory (
str): - The path to the directory for the persistent database; if empty, the current working directory will be used
- files_directory (
str): - The path to the directory for storing files; if empty, database_directory will be used
- use_file_database (
bool): - If set to true, information about downloaded and uploaded files will be saved between application restarts
- use_chat_info_database (
bool): - If set to true, the library will maintain a cache of users, basic groups, supergroups, channels and secret chatsImplies use_file_database
- use_message_database (
bool): - If set to true, the library will maintain a cache of chats and messagesImplies use_chat_info_database
- use_secret_chats (
bool): - If set to true, support for secret chats will be enabled
- api_id (
int): - Application identifier for Telegram API access, which can be obtained at https://mytelegramorg
- api_hash (
str): - Application identifier hash for Telegram API access, which can be obtained at https://mytelegramorg
- system_language_code (
str): - IETF language tag of the user’s operating system language; must be non-empty
- device_model (
str): - Model of the device the application is being run on; must be non-empty
- system_version (
str): - Version of the operating system the application is being run onIf empty, the version is automatically detected by TDLib
- application_version (
str): - Application version; must be non-empty
- enable_storage_optimizer (
bool): - If set to true, old files will automatically be deleted
- ignore_file_names (
bool): - If set to true, original file names will be ignoredOtherwise, downloaded files will be saved under names as close as possible to the original name
- use_test_dc (
- Returns:
- TdlibParameters
- Raises:
telegram.Error
-
ID= 'tdlibParameters'¶
-
static
read(q: dict, *args) → pytglib.api.types.tdlib_parameters.TdlibParameters¶
pytglib.api.types.temporary_password_state module¶
-
class
pytglib.api.types.temporary_password_state.TemporaryPasswordState(has_password, valid_for, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectReturns information about the availability of a temporary password, which can be used for payments
- Attributes:
- ID (
str):TemporaryPasswordState - Args:
- has_password (
bool): - True, if a temporary password is available
- valid_for (
int): - Time left before the temporary password expires, in seconds
- has_password (
- Returns:
- TemporaryPasswordState
- Raises:
telegram.Error
-
ID= 'temporaryPasswordState'¶
-
static
read(q: dict, *args) → pytglib.api.types.temporary_password_state.TemporaryPasswordState¶
pytglib.api.types.terms_of_service module¶
-
class
pytglib.api.types.terms_of_service.TermsOfService(text, min_user_age, show_popup, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains Telegram terms of service
- Attributes:
- ID (
str):TermsOfService - Args:
- text (
telegram.api.types.formattedText): - Text of the terms of service
- min_user_age (
int): - The minimum age of a user to be able to accept the terms; 0 if age isn’t restricted
- show_popup (
bool): - True, if a blocking popup with terms of service must be shown to the user
- text (
- Returns:
- TermsOfService
- Raises:
telegram.Error
-
ID= 'termsOfService'¶
-
static
read(q: dict, *args) → pytglib.api.types.terms_of_service.TermsOfService¶
pytglib.api.types.test_bytes module¶
-
class
pytglib.api.types.test_bytes.TestBytes(value, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA simple object containing a sequence of bytes; for testing only
- Attributes:
- ID (
str):TestBytes - Args:
- value (
bytes): - Bytes
- value (
- Returns:
- TestBytes
- Raises:
telegram.Error
-
ID= 'testBytes'¶
-
static
read(q: dict, *args) → pytglib.api.types.test_bytes.TestBytes¶
pytglib.api.types.test_int module¶
-
class
pytglib.api.types.test_int.TestInt(value, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA simple object containing a number; for testing only
- Attributes:
- ID (
str):TestInt - Args:
- value (
int): - Number
- value (
- Returns:
- TestInt
- Raises:
telegram.Error
-
ID= 'testInt'¶
-
static
read(q: dict, *args) → pytglib.api.types.test_int.TestInt¶
pytglib.api.types.test_string module¶
-
class
pytglib.api.types.test_string.TestString(value, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA simple object containing a string; for testing only
- Attributes:
- ID (
str):TestString - Args:
- value (
str): - String
- value (
- Returns:
- TestString
- Raises:
telegram.Error
-
ID= 'testString'¶
-
static
read(q: dict, *args) → pytglib.api.types.test_string.TestString¶
pytglib.api.types.test_vector_int module¶
-
class
pytglib.api.types.test_vector_int.TestVectorInt(value, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA simple object containing a vector of numbers; for testing only
- Attributes:
- ID (
str):TestVectorInt - Args:
- value (List of
int): - Vector of numbers
- value (List of
- Returns:
- TestVectorInt
- Raises:
telegram.Error
-
ID= 'testVectorInt'¶
-
static
read(q: dict, *args) → pytglib.api.types.test_vector_int.TestVectorInt¶
pytglib.api.types.test_vector_int_object module¶
-
class
pytglib.api.types.test_vector_int_object.TestVectorIntObject(value, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA simple object containing a vector of objects that hold a number; for testing only
- Attributes:
- ID (
str):TestVectorIntObject - Args:
- value (List of
telegram.api.types.testInt): - Vector of objects
- value (List of
- Returns:
- TestVectorIntObject
- Raises:
telegram.Error
-
ID= 'testVectorIntObject'¶
-
static
read(q: dict, *args) → pytglib.api.types.test_vector_int_object.TestVectorIntObject¶
pytglib.api.types.test_vector_string module¶
-
class
pytglib.api.types.test_vector_string.TestVectorString(value, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA simple object containing a vector of strings; for testing only
- Attributes:
- ID (
str):TestVectorString - Args:
- value (List of
str): - Vector of strings
- value (List of
- Returns:
- TestVectorString
- Raises:
telegram.Error
-
ID= 'testVectorString'¶
-
static
read(q: dict, *args) → pytglib.api.types.test_vector_string.TestVectorString¶
pytglib.api.types.test_vector_string_object module¶
-
class
pytglib.api.types.test_vector_string_object.TestVectorStringObject(value, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA simple object containing a vector of objects that hold a string; for testing only
- Attributes:
- ID (
str):TestVectorStringObject - Args:
- value (List of
telegram.api.types.testString): - Vector of objects
- value (List of
- Returns:
- TestVectorStringObject
- Raises:
telegram.Error
-
ID= 'testVectorStringObject'¶
-
static
read(q: dict, *args) → pytglib.api.types.test_vector_string_object.TestVectorStringObject¶
pytglib.api.types.text module¶
-
class
pytglib.api.types.text.Text(text, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains some text
- Attributes:
- ID (
str):Text - Args:
- text (
str): - Text
- text (
- Returns:
- Text
- Raises:
telegram.Error
-
ID= 'text'¶
-
static
read(q: dict, *args) → pytglib.api.types.text.Text¶
pytglib.api.types.text_entities module¶
-
class
pytglib.api.types.text_entities.TextEntities(entities, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains a list of text entities
- Attributes:
- ID (
str):TextEntities - Args:
- entities (List of
telegram.api.types.textEntity): - List of text entities
- entities (List of
- Returns:
- TextEntities
- Raises:
telegram.Error
-
ID= 'textEntities'¶
-
static
read(q: dict, *args) → pytglib.api.types.text_entities.TextEntities¶
pytglib.api.types.text_entity module¶
-
class
pytglib.api.types.text_entity.TextEntity(offset, length, type, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents a part of the text that needs to be formatted in some unusual way
- Attributes:
- ID (
str):TextEntity - Args:
- offset (
int): - Offset of the entity, in UTF-16 code units
- length (
int): - Length of the entity, in UTF-16 code units
- type (
telegram.api.types.TextEntityType): - Type of the entity
- offset (
- Returns:
- TextEntity
- Raises:
telegram.Error
-
ID= 'textEntity'¶
-
static
read(q: dict, *args) → pytglib.api.types.text_entity.TextEntity¶
pytglib.api.types.text_entity_type module¶
-
class
pytglib.api.types.text_entity_type.TextEntityType(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents a part of the text which must be formatted differently
No parameters required.
-
ID= 'textEntityType'¶
-
static
read(q: dict, *args) → TextEntityTypePre or TextEntityTypePreCode or TextEntityTypeCode or TextEntityTypeHashtag or TextEntityTypeBotCommand or TextEntityTypeMediaTimestamp or TextEntityTypePhoneNumber or TextEntityTypeMention or TextEntityTypeMentionName or TextEntityTypeUnderline or TextEntityTypeItalic or TextEntityTypeEmailAddress or TextEntityTypeBold or TextEntityTypeSpoiler or TextEntityTypeCashtag or TextEntityTypeBankCardNumber or TextEntityTypeTextUrl or TextEntityTypeUrl or TextEntityTypeStrikethrough¶
-
pytglib.api.types.text_entity_type_bank_card_number module¶
-
class
pytglib.api.types.text_entity_type_bank_card_number.TextEntityTypeBankCardNumber(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA bank card number. The getBankCardInfo method can be used to get information about the bank card
- Attributes:
- ID (
str):TextEntityTypeBankCardNumber
No parameters required.
- Returns:
- TextEntityType
- Raises:
telegram.Error
-
ID= 'textEntityTypeBankCardNumber'¶
-
static
read(q: dict, *args) → pytglib.api.types.text_entity_type_bank_card_number.TextEntityTypeBankCardNumber¶
pytglib.api.types.text_entity_type_bold module¶
-
class
pytglib.api.types.text_entity_type_bold.TextEntityTypeBold(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA bold text
- Attributes:
- ID (
str):TextEntityTypeBold
No parameters required.
- Returns:
- TextEntityType
- Raises:
telegram.Error
-
ID= 'textEntityTypeBold'¶
-
static
read(q: dict, *args) → pytglib.api.types.text_entity_type_bold.TextEntityTypeBold¶
pytglib.api.types.text_entity_type_bot_command module¶
-
class
pytglib.api.types.text_entity_type_bot_command.TextEntityTypeBotCommand(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA bot command, beginning with “/”
- Attributes:
- ID (
str):TextEntityTypeBotCommand
No parameters required.
- Returns:
- TextEntityType
- Raises:
telegram.Error
-
ID= 'textEntityTypeBotCommand'¶
-
static
read(q: dict, *args) → pytglib.api.types.text_entity_type_bot_command.TextEntityTypeBotCommand¶
pytglib.api.types.text_entity_type_cashtag module¶
-
class
pytglib.api.types.text_entity_type_cashtag.TextEntityTypeCashtag(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA cashtag text, beginning with “$” and consisting of capital English letters (e.g., “$USD”)
- Attributes:
- ID (
str):TextEntityTypeCashtag
No parameters required.
- Returns:
- TextEntityType
- Raises:
telegram.Error
-
ID= 'textEntityTypeCashtag'¶
-
static
read(q: dict, *args) → pytglib.api.types.text_entity_type_cashtag.TextEntityTypeCashtag¶
pytglib.api.types.text_entity_type_code module¶
-
class
pytglib.api.types.text_entity_type_code.TextEntityTypeCode(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectText that must be formatted as if inside a code HTML tag
- Attributes:
- ID (
str):TextEntityTypeCode
No parameters required.
- Returns:
- TextEntityType
- Raises:
telegram.Error
-
ID= 'textEntityTypeCode'¶
-
static
read(q: dict, *args) → pytglib.api.types.text_entity_type_code.TextEntityTypeCode¶
pytglib.api.types.text_entity_type_email_address module¶
-
class
pytglib.api.types.text_entity_type_email_address.TextEntityTypeEmailAddress(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectAn email address
- Attributes:
- ID (
str):TextEntityTypeEmailAddress
No parameters required.
- Returns:
- TextEntityType
- Raises:
telegram.Error
-
ID= 'textEntityTypeEmailAddress'¶
-
static
read(q: dict, *args) → pytglib.api.types.text_entity_type_email_address.TextEntityTypeEmailAddress¶
pytglib.api.types.text_entity_type_hashtag module¶
-
class
pytglib.api.types.text_entity_type_hashtag.TextEntityTypeHashtag(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA hashtag text, beginning with “#”
- Attributes:
- ID (
str):TextEntityTypeHashtag
No parameters required.
- Returns:
- TextEntityType
- Raises:
telegram.Error
-
ID= 'textEntityTypeHashtag'¶
-
static
read(q: dict, *args) → pytglib.api.types.text_entity_type_hashtag.TextEntityTypeHashtag¶
pytglib.api.types.text_entity_type_italic module¶
-
class
pytglib.api.types.text_entity_type_italic.TextEntityTypeItalic(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectAn italic text
- Attributes:
- ID (
str):TextEntityTypeItalic
No parameters required.
- Returns:
- TextEntityType
- Raises:
telegram.Error
-
ID= 'textEntityTypeItalic'¶
-
static
read(q: dict, *args) → pytglib.api.types.text_entity_type_italic.TextEntityTypeItalic¶
pytglib.api.types.text_entity_type_mention module¶
-
class
pytglib.api.types.text_entity_type_mention.TextEntityTypeMention(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA mention of a user by their username
- Attributes:
- ID (
str):TextEntityTypeMention
No parameters required.
- Returns:
- TextEntityType
- Raises:
telegram.Error
-
ID= 'textEntityTypeMention'¶
-
static
read(q: dict, *args) → pytglib.api.types.text_entity_type_mention.TextEntityTypeMention¶
pytglib.api.types.text_entity_type_mention_name module¶
-
class
pytglib.api.types.text_entity_type_mention_name.TextEntityTypeMentionName(user_id, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA text shows instead of a raw mention of the user (e.g., when the user has no username)
- Attributes:
- ID (
str):TextEntityTypeMentionName - Args:
- user_id (
int): - Identifier of the mentioned user
- user_id (
- Returns:
- TextEntityType
- Raises:
telegram.Error
-
ID= 'textEntityTypeMentionName'¶
-
static
read(q: dict, *args) → pytglib.api.types.text_entity_type_mention_name.TextEntityTypeMentionName¶
pytglib.api.types.text_entity_type_phone_number module¶
-
class
pytglib.api.types.text_entity_type_phone_number.TextEntityTypePhoneNumber(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA phone number
- Attributes:
- ID (
str):TextEntityTypePhoneNumber
No parameters required.
- Returns:
- TextEntityType
- Raises:
telegram.Error
-
ID= 'textEntityTypePhoneNumber'¶
-
static
read(q: dict, *args) → pytglib.api.types.text_entity_type_phone_number.TextEntityTypePhoneNumber¶
pytglib.api.types.text_entity_type_pre module¶
-
class
pytglib.api.types.text_entity_type_pre.TextEntityTypePre(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectText that must be formatted as if inside a pre HTML tag
- Attributes:
- ID (
str):TextEntityTypePre
No parameters required.
- Returns:
- TextEntityType
- Raises:
telegram.Error
-
ID= 'textEntityTypePre'¶
-
static
read(q: dict, *args) → pytglib.api.types.text_entity_type_pre.TextEntityTypePre¶
pytglib.api.types.text_entity_type_pre_code module¶
-
class
pytglib.api.types.text_entity_type_pre_code.TextEntityTypePreCode(language, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectText that must be formatted as if inside pre, and code HTML tags
- Attributes:
- ID (
str):TextEntityTypePreCode - Args:
- language (
str): - Programming language of the code; as defined by the sender
- language (
- Returns:
- TextEntityType
- Raises:
telegram.Error
-
ID= 'textEntityTypePreCode'¶
-
static
read(q: dict, *args) → pytglib.api.types.text_entity_type_pre_code.TextEntityTypePreCode¶
pytglib.api.types.text_entity_type_strikethrough module¶
-
class
pytglib.api.types.text_entity_type_strikethrough.TextEntityTypeStrikethrough(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA strikethrough text
- Attributes:
- ID (
str):TextEntityTypeStrikethrough
No parameters required.
- Returns:
- TextEntityType
- Raises:
telegram.Error
-
ID= 'textEntityTypeStrikethrough'¶
-
static
read(q: dict, *args) → pytglib.api.types.text_entity_type_strikethrough.TextEntityTypeStrikethrough¶
pytglib.api.types.text_entity_type_text_url module¶
-
class
pytglib.api.types.text_entity_type_text_url.TextEntityTypeTextUrl(url, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA text description shown instead of a raw URL
- Attributes:
- ID (
str):TextEntityTypeTextUrl - Args:
- url (
str): - HTTP or tg:// URL to be opened when the link is clicked
- url (
- Returns:
- TextEntityType
- Raises:
telegram.Error
-
ID= 'textEntityTypeTextUrl'¶
-
static
read(q: dict, *args) → pytglib.api.types.text_entity_type_text_url.TextEntityTypeTextUrl¶
pytglib.api.types.text_entity_type_underline module¶
-
class
pytglib.api.types.text_entity_type_underline.TextEntityTypeUnderline(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectAn underlined text
- Attributes:
- ID (
str):TextEntityTypeUnderline
No parameters required.
- Returns:
- TextEntityType
- Raises:
telegram.Error
-
ID= 'textEntityTypeUnderline'¶
-
static
read(q: dict, *args) → pytglib.api.types.text_entity_type_underline.TextEntityTypeUnderline¶
pytglib.api.types.text_entity_type_url module¶
-
class
pytglib.api.types.text_entity_type_url.TextEntityTypeUrl(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectAn HTTP URL
- Attributes:
- ID (
str):TextEntityTypeUrl
No parameters required.
- Returns:
- TextEntityType
- Raises:
telegram.Error
-
ID= 'textEntityTypeUrl'¶
-
static
read(q: dict, *args) → pytglib.api.types.text_entity_type_url.TextEntityTypeUrl¶
pytglib.api.types.text_parse_mode module¶
-
class
pytglib.api.types.text_parse_mode.TextParseMode(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectDescribes the way the text needs to be parsed for TextEntities
No parameters required.
-
ID= 'textParseMode'¶
-
static
read(q: dict, *args) → TextParseModeMarkdown or TextParseModeHTML¶
-
pytglib.api.types.text_parse_mode_html module¶
-
class
pytglib.api.types.text_parse_mode_html.TextParseModeHTML(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe text uses HTML-style formatting. The same as Telegram Bot API “HTML” parse mode
- Attributes:
- ID (
str):TextParseModeHTML
No parameters required.
- Returns:
- TextParseMode
- Raises:
telegram.Error
-
ID= 'textParseModeHTML'¶
-
static
read(q: dict, *args) → pytglib.api.types.text_parse_mode_html.TextParseModeHTML¶
pytglib.api.types.text_parse_mode_markdown module¶
-
class
pytglib.api.types.text_parse_mode_markdown.TextParseModeMarkdown(version, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe text uses Markdown-style formatting
- Attributes:
- ID (
str):TextParseModeMarkdown - Args:
- version (
int): - Version of the parser: 0 or 1 - Telegram Bot API “Markdown” parse mode, 2 - Telegram Bot API “MarkdownV2” parse mode
- version (
- Returns:
- TextParseMode
- Raises:
telegram.Error
-
ID= 'textParseModeMarkdown'¶
-
static
read(q: dict, *args) → pytglib.api.types.text_parse_mode_markdown.TextParseModeMarkdown¶
pytglib.api.types.top_chat_category module¶
-
class
pytglib.api.types.top_chat_category.TopChatCategory(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents the categories of chats for which a list of frequently used chats can be retrieved
No parameters required.
-
ID= 'topChatCategory'¶
-
static
read(q: dict, *args) → TopChatCategoryBots or TopChatCategoryChannels or TopChatCategoryInlineBots or TopChatCategoryCalls or TopChatCategoryForwardChats or TopChatCategoryGroups or TopChatCategoryUsers¶
-
pytglib.api.types.top_chat_category_bots module¶
-
class
pytglib.api.types.top_chat_category_bots.TopChatCategoryBots(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA category containing frequently used private chats with bot users
- Attributes:
- ID (
str):TopChatCategoryBots
No parameters required.
- Returns:
- TopChatCategory
- Raises:
telegram.Error
-
ID= 'topChatCategoryBots'¶
-
static
read(q: dict, *args) → pytglib.api.types.top_chat_category_bots.TopChatCategoryBots¶
pytglib.api.types.top_chat_category_calls module¶
-
class
pytglib.api.types.top_chat_category_calls.TopChatCategoryCalls(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA category containing frequently used chats used for calls
- Attributes:
- ID (
str):TopChatCategoryCalls
No parameters required.
- Returns:
- TopChatCategory
- Raises:
telegram.Error
-
ID= 'topChatCategoryCalls'¶
-
static
read(q: dict, *args) → pytglib.api.types.top_chat_category_calls.TopChatCategoryCalls¶
pytglib.api.types.top_chat_category_channels module¶
-
class
pytglib.api.types.top_chat_category_channels.TopChatCategoryChannels(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA category containing frequently used channels
- Attributes:
- ID (
str):TopChatCategoryChannels
No parameters required.
- Returns:
- TopChatCategory
- Raises:
telegram.Error
-
ID= 'topChatCategoryChannels'¶
-
static
read(q: dict, *args) → pytglib.api.types.top_chat_category_channels.TopChatCategoryChannels¶
pytglib.api.types.top_chat_category_forward_chats module¶
-
class
pytglib.api.types.top_chat_category_forward_chats.TopChatCategoryForwardChats(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA category containing frequently used chats used to forward messages
- Attributes:
- ID (
str):TopChatCategoryForwardChats
No parameters required.
- Returns:
- TopChatCategory
- Raises:
telegram.Error
-
ID= 'topChatCategoryForwardChats'¶
-
static
read(q: dict, *args) → pytglib.api.types.top_chat_category_forward_chats.TopChatCategoryForwardChats¶
pytglib.api.types.top_chat_category_groups module¶
-
class
pytglib.api.types.top_chat_category_groups.TopChatCategoryGroups(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA category containing frequently used basic groups and supergroups
- Attributes:
- ID (
str):TopChatCategoryGroups
No parameters required.
- Returns:
- TopChatCategory
- Raises:
telegram.Error
-
ID= 'topChatCategoryGroups'¶
-
static
read(q: dict, *args) → pytglib.api.types.top_chat_category_groups.TopChatCategoryGroups¶
pytglib.api.types.top_chat_category_inline_bots module¶
-
class
pytglib.api.types.top_chat_category_inline_bots.TopChatCategoryInlineBots(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA category containing frequently used chats with inline bots sorted by their usage in inline mode
- Attributes:
- ID (
str):TopChatCategoryInlineBots
No parameters required.
- Returns:
- TopChatCategory
- Raises:
telegram.Error
-
ID= 'topChatCategoryInlineBots'¶
-
static
read(q: dict, *args) → pytglib.api.types.top_chat_category_inline_bots.TopChatCategoryInlineBots¶
pytglib.api.types.top_chat_category_users module¶
-
class
pytglib.api.types.top_chat_category_users.TopChatCategoryUsers(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA category containing frequently used private chats with non-bot users
- Attributes:
- ID (
str):TopChatCategoryUsers
No parameters required.
- Returns:
- TopChatCategory
- Raises:
telegram.Error
-
ID= 'topChatCategoryUsers'¶
-
static
read(q: dict, *args) → pytglib.api.types.top_chat_category_users.TopChatCategoryUsers¶
pytglib.api.types.update module¶
-
class
pytglib.api.types.update.Update(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains notifications about data changes
No parameters required.
-
ID= 'update'¶
-
static
read(q: dict, *args) → UpdateChatHasProtectedContent or UpdateChatMessageSender or UpdateBasicGroupFullInfo or UpdateNewShippingQuery or UpdateLanguagePackStrings or UpdateServiceNotification or UpdateGroupCallParticipant or UpdateUser or UpdateNewPreCheckoutQuery or UpdateBasicGroup or UpdateNewCallbackQuery or UpdatePollAnswer or UpdateUserFullInfo or UpdateChatTitle or UpdateMessageSendFailed or UpdateChatOnlineMemberCount or UpdateChatActionBar or UpdateChatReadInbox or UpdateMessageContent or UpdateChatDefaultDisableNotification or UpdateChatPendingJoinRequests or UpdateChatIsBlocked or UpdateChatPermissions or UpdateReactions or UpdateChatUnreadReactionCount or UpdateChatReplyMarkup or UpdateUserStatus or UpdateChatIsMarkedAsUnread or UpdateSuggestedActions or UpdateMessageSendAcknowledged or UpdateNewChosenInlineResult or UpdateFileAddedToDownloads or UpdateTermsOfService or UpdateSecretChat or UpdateUsersNearby or UpdateMessageIsPinned or UpdateInstalledStickerSets or UpdateHavePendingNotifications or UpdateChatPosition or UpdateMessageContentOpened or UpdateSupergroup or UpdateChatVideoChat or UpdateConnectionState or UpdateMessageUnreadReactions or UpdateAnimatedEmojiMessageClicked or UpdateChatUnreadMentionCount or UpdateSupergroupFullInfo or UpdateSelectedBackground or UpdateStickerSet or UpdateRecentStickers or UpdateMessageEdited or UpdateChatLastMessage or UpdateChatThemes or UpdateChatHasScheduledMessages or UpdateDiceEmojis or UpdateUnreadChatCount or UpdateMessageMentionRead or UpdateFileDownload or UpdateActiveNotifications or UpdateNewInlineCallbackQuery or UpdateChatDraftMessage or UpdateNotificationGroup or UpdateNotification or UpdateNewCallSignalingData or UpdateAnimationSearchParameters or UpdateAttachmentMenuBots or UpdateOption or UpdateNewCustomQuery or UpdateFileRemovedFromDownloads or UpdateNewMessage or UpdateMessageInteractionInfo or UpdateGroupCall or UpdateWebAppMessageSent or UpdateAuthorizationState or UpdateChatMember or UpdateFavoriteStickers or UpdateChatAvailableReactions or UpdateDeleteMessages or UpdateFile or UpdateScopeNotificationSettings or UpdatePoll or UpdateChatTheme or UpdateUserPrivacySettingRules or UpdateNewChatJoinRequest or UpdateChatNotificationSettings or UpdateFileDownloads or UpdateChatMessageTtl or UpdateSavedAnimations or UpdateNewCustomEvent or UpdateNewChat or UpdateFileGenerationStop or UpdateMessageSendSucceeded or UpdateUnreadMessageCount or UpdateTrendingStickerSets or UpdateSavedNotificationSounds or UpdateMessageLiveLocationViewed or UpdateFileGenerationStart or UpdateChatPhoto or UpdateNewInlineQuery or UpdateChatAction or UpdateChatFilters or UpdateChatReadOutbox or UpdateCall¶
-
pytglib.api.types.update_active_notifications module¶
-
class
pytglib.api.types.update_active_notifications.UpdateActiveNotifications(groups, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains active notifications that was shown on previous application launches. This update is sent only if the message database is used. In that case it comes once before any updateNotification and updateNotificationGroup update
- Attributes:
- ID (
str):UpdateActiveNotifications - Args:
- groups (List of
telegram.api.types.notificationGroup): - Lists of active notification groups
- groups (List of
- Returns:
- Update
- Raises:
telegram.Error
-
ID= 'updateActiveNotifications'¶
-
static
read(q: dict, *args) → pytglib.api.types.update_active_notifications.UpdateActiveNotifications¶
pytglib.api.types.update_authorization_state module¶
Bases:
pytglib.api.utils.object.ObjectThe user authorization state has changed
- Attributes:
- ID (
str):UpdateAuthorizationState - Args:
- authorization_state (
telegram.api.types.AuthorizationState): - New authorization state
- authorization_state (
- Returns:
- Update
- Raises:
telegram.Error
pytglib.api.types.update_basic_group module¶
-
class
pytglib.api.types.update_basic_group.UpdateBasicGroup(basic_group, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectSome data of a basic group has changed. This update is guaranteed to come before the basic group identifier is returned to the application
- Attributes:
- ID (
str):UpdateBasicGroup - Args:
- basic_group (
telegram.api.types.basicGroup): - New data about the group
- basic_group (
- Returns:
- Update
- Raises:
telegram.Error
-
ID= 'updateBasicGroup'¶
-
static
read(q: dict, *args) → pytglib.api.types.update_basic_group.UpdateBasicGroup¶
pytglib.api.types.update_basic_group_full_info module¶
-
class
pytglib.api.types.update_basic_group_full_info.UpdateBasicGroupFullInfo(basic_group_id, basic_group_full_info, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectSome data in basicGroupFullInfo has been changed
- Attributes:
- ID (
str):UpdateBasicGroupFullInfo - Args:
- basic_group_id (
int): - Identifier of a basic group
- basic_group_full_info (
telegram.api.types.basicGroupFullInfo): - New full information about the group
- basic_group_id (
- Returns:
- Update
- Raises:
telegram.Error
-
ID= 'updateBasicGroupFullInfo'¶
-
static
read(q: dict, *args) → pytglib.api.types.update_basic_group_full_info.UpdateBasicGroupFullInfo¶
pytglib.api.types.update_call module¶
-
class
pytglib.api.types.update_call.UpdateCall(call, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectNew call was created or information about a call was updated
- Attributes:
- ID (
str):UpdateCall - Args:
- call (
telegram.api.types.call): - New data about a call
- call (
- Returns:
- Update
- Raises:
telegram.Error
-
ID= 'updateCall'¶
-
static
read(q: dict, *args) → pytglib.api.types.update_call.UpdateCall¶
pytglib.api.types.update_chat_action_bar module¶
-
class
pytglib.api.types.update_chat_action_bar.UpdateChatActionBar(chat_id, action_bar, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe chat action bar was changed
- Attributes:
- ID (
str):UpdateChatActionBar - Args:
- chat_id (
int): - Chat identifier
- action_bar (
telegram.api.types.ChatActionBar): - The new value of the action bar; may be null
- chat_id (
- Returns:
- Update
- Raises:
telegram.Error
-
ID= 'updateChatActionBar'¶
-
static
read(q: dict, *args) → pytglib.api.types.update_chat_action_bar.UpdateChatActionBar¶
pytglib.api.types.update_chat_chat_list module¶
pytglib.api.types.update_chat_default_disable_notification module¶
-
class
pytglib.api.types.update_chat_default_disable_notification.UpdateChatDefaultDisableNotification(chat_id, default_disable_notification, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe value of the default disable_notification parameter, used when a message is sent to the chat, was changed
- Attributes:
- ID (
str):UpdateChatDefaultDisableNotification - Args:
- chat_id (
int): - Chat identifier
- default_disable_notification (
bool): - The new default_disable_notification value
- chat_id (
- Returns:
- Update
- Raises:
telegram.Error
-
ID= 'updateChatDefaultDisableNotification'¶
-
static
read(q: dict, *args) → pytglib.api.types.update_chat_default_disable_notification.UpdateChatDefaultDisableNotification¶
pytglib.api.types.update_chat_draft_message module¶
-
class
pytglib.api.types.update_chat_draft_message.UpdateChatDraftMessage(chat_id, draft_message, positions, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA chat draft has changed. Be aware that the update may come in the currently opened chat but with old content of the draft. If the user has changed the content of the draft, this update mustn’t be applied
- Attributes:
- ID (
str):UpdateChatDraftMessage - Args:
- chat_id (
int): - Chat identifier
- draft_message (
telegram.api.types.draftMessage): - The new draft message; may be null
- positions (List of
telegram.api.types.chatPosition): - The new chat positions in the chat lists
- chat_id (
- Returns:
- Update
- Raises:
telegram.Error
-
ID= 'updateChatDraftMessage'¶
-
static
read(q: dict, *args) → pytglib.api.types.update_chat_draft_message.UpdateChatDraftMessage¶
pytglib.api.types.update_chat_has_scheduled_messages module¶
-
class
pytglib.api.types.update_chat_has_scheduled_messages.UpdateChatHasScheduledMessages(chat_id, has_scheduled_messages, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA chat’s has_scheduled_messages field has changed
- Attributes:
- ID (
str):UpdateChatHasScheduledMessages - Args:
- chat_id (
int): - Chat identifier
- has_scheduled_messages (
bool): - New value of has_scheduled_messages
- chat_id (
- Returns:
- Update
- Raises:
telegram.Error
-
ID= 'updateChatHasScheduledMessages'¶
-
static
read(q: dict, *args) → pytglib.api.types.update_chat_has_scheduled_messages.UpdateChatHasScheduledMessages¶
pytglib.api.types.update_chat_is_marked_as_unread module¶
-
class
pytglib.api.types.update_chat_is_marked_as_unread.UpdateChatIsMarkedAsUnread(chat_id, is_marked_as_unread, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA chat was marked as unread or was read
- Attributes:
- ID (
str):UpdateChatIsMarkedAsUnread - Args:
- chat_id (
int): - Chat identifier
- is_marked_as_unread (
bool): - New value of is_marked_as_unread
- chat_id (
- Returns:
- Update
- Raises:
telegram.Error
-
ID= 'updateChatIsMarkedAsUnread'¶
-
static
read(q: dict, *args) → pytglib.api.types.update_chat_is_marked_as_unread.UpdateChatIsMarkedAsUnread¶
pytglib.api.types.update_chat_is_pinned module¶
pytglib.api.types.update_chat_is_sponsored module¶
pytglib.api.types.update_chat_last_message module¶
-
class
pytglib.api.types.update_chat_last_message.UpdateChatLastMessage(chat_id, last_message, positions, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe last message of a chat was changed. If last_message is null, then the last message in the chat became unknown. Some new unknown messages might be added to the chat in this case
- Attributes:
- ID (
str):UpdateChatLastMessage - Args:
- chat_id (
int): - Chat identifier
- last_message (
telegram.api.types.message): - The new last message in the chat; may be null
- positions (List of
telegram.api.types.chatPosition): - The new chat positions in the chat lists
- chat_id (
- Returns:
- Update
- Raises:
telegram.Error
-
ID= 'updateChatLastMessage'¶
-
static
read(q: dict, *args) → pytglib.api.types.update_chat_last_message.UpdateChatLastMessage¶
pytglib.api.types.update_chat_notification_settings module¶
-
class
pytglib.api.types.update_chat_notification_settings.UpdateChatNotificationSettings(chat_id, notification_settings, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectNotification settings for a chat were changed
- Attributes:
- ID (
str):UpdateChatNotificationSettings - Args:
- chat_id (
int): - Chat identifier
- notification_settings (
telegram.api.types.chatNotificationSettings): - The new notification settings
- chat_id (
- Returns:
- Update
- Raises:
telegram.Error
-
ID= 'updateChatNotificationSettings'¶
-
static
read(q: dict, *args) → pytglib.api.types.update_chat_notification_settings.UpdateChatNotificationSettings¶
pytglib.api.types.update_chat_online_member_count module¶
-
class
pytglib.api.types.update_chat_online_member_count.UpdateChatOnlineMemberCount(chat_id, online_member_count, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe number of online group members has changed. This update with non-zero number of online group members is sent only for currently opened chats. There is no guarantee that it will be sent just after the number of online users has changed
- Attributes:
- ID (
str):UpdateChatOnlineMemberCount - Args:
- chat_id (
int): - Identifier of the chat
- online_member_count (
int): - New number of online members in the chat, or 0 if unknown
- chat_id (
- Returns:
- Update
- Raises:
telegram.Error
-
ID= 'updateChatOnlineMemberCount'¶
-
static
read(q: dict, *args) → pytglib.api.types.update_chat_online_member_count.UpdateChatOnlineMemberCount¶
pytglib.api.types.update_chat_order module¶
pytglib.api.types.update_chat_permissions module¶
-
class
pytglib.api.types.update_chat_permissions.UpdateChatPermissions(chat_id, permissions, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectChat permissions was changed
- Attributes:
- ID (
str):UpdateChatPermissions - Args:
- chat_id (
int): - Chat identifier
- permissions (
telegram.api.types.chatPermissions): - The new chat permissions
- chat_id (
- Returns:
- Update
- Raises:
telegram.Error
-
ID= 'updateChatPermissions'¶
-
static
read(q: dict, *args) → pytglib.api.types.update_chat_permissions.UpdateChatPermissions¶
pytglib.api.types.update_chat_photo module¶
-
class
pytglib.api.types.update_chat_photo.UpdateChatPhoto(chat_id, photo, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA chat photo was changed
- Attributes:
- ID (
str):UpdateChatPhoto - Args:
- chat_id (
int): - Chat identifier
- photo (
telegram.api.types.chatPhotoInfo): - The new chat photo; may be null
- chat_id (
- Returns:
- Update
- Raises:
telegram.Error
-
ID= 'updateChatPhoto'¶
-
static
read(q: dict, *args) → pytglib.api.types.update_chat_photo.UpdateChatPhoto¶
pytglib.api.types.update_chat_pinned_message module¶
pytglib.api.types.update_chat_read_inbox module¶
-
class
pytglib.api.types.update_chat_read_inbox.UpdateChatReadInbox(chat_id, last_read_inbox_message_id, unread_count, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectIncoming messages were read or the number of unread messages has been changed
- Attributes:
- ID (
str):UpdateChatReadInbox - Args:
- chat_id (
int): - Chat identifier
- last_read_inbox_message_id (
int): - Identifier of the last read incoming message
- unread_count (
int): - The number of unread messages left in the chat
- chat_id (
- Returns:
- Update
- Raises:
telegram.Error
-
ID= 'updateChatReadInbox'¶
-
static
read(q: dict, *args) → pytglib.api.types.update_chat_read_inbox.UpdateChatReadInbox¶
pytglib.api.types.update_chat_read_outbox module¶
-
class
pytglib.api.types.update_chat_read_outbox.UpdateChatReadOutbox(chat_id, last_read_outbox_message_id, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectOutgoing messages were read
- Attributes:
- ID (
str):UpdateChatReadOutbox - Args:
- chat_id (
int): - Chat identifier
- last_read_outbox_message_id (
int): - Identifier of last read outgoing message
- chat_id (
- Returns:
- Update
- Raises:
telegram.Error
-
ID= 'updateChatReadOutbox'¶
-
static
read(q: dict, *args) → pytglib.api.types.update_chat_read_outbox.UpdateChatReadOutbox¶
pytglib.api.types.update_chat_reply_markup module¶
-
class
pytglib.api.types.update_chat_reply_markup.UpdateChatReplyMarkup(chat_id, reply_markup_message_id, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe default chat reply markup was changed. Can occur because new messages with reply markup were received or because an old reply markup was hidden by the user
- Attributes:
- ID (
str):UpdateChatReplyMarkup - Args:
- chat_id (
int): - Chat identifier
- reply_markup_message_id (
int): - Identifier of the message from which reply markup needs to be used; 0 if there is no default custom reply markup in the chat
- chat_id (
- Returns:
- Update
- Raises:
telegram.Error
-
ID= 'updateChatReplyMarkup'¶
-
static
read(q: dict, *args) → pytglib.api.types.update_chat_reply_markup.UpdateChatReplyMarkup¶
pytglib.api.types.update_chat_title module¶
-
class
pytglib.api.types.update_chat_title.UpdateChatTitle(chat_id, title, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe title of a chat was changed
- Attributes:
- ID (
str):UpdateChatTitle - Args:
- chat_id (
int): - Chat identifier
- title (
str): - The new chat title
- chat_id (
- Returns:
- Update
- Raises:
telegram.Error
-
ID= 'updateChatTitle'¶
-
static
read(q: dict, *args) → pytglib.api.types.update_chat_title.UpdateChatTitle¶
pytglib.api.types.update_chat_unread_mention_count module¶
-
class
pytglib.api.types.update_chat_unread_mention_count.UpdateChatUnreadMentionCount(chat_id, unread_mention_count, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe chat unread_mention_count has changed
- Attributes:
- ID (
str):UpdateChatUnreadMentionCount - Args:
- chat_id (
int): - Chat identifier
- unread_mention_count (
int): - The number of unread mention messages left in the chat
- chat_id (
- Returns:
- Update
- Raises:
telegram.Error
-
ID= 'updateChatUnreadMentionCount'¶
-
static
read(q: dict, *args) → pytglib.api.types.update_chat_unread_mention_count.UpdateChatUnreadMentionCount¶
pytglib.api.types.update_connection_state module¶
-
class
pytglib.api.types.update_connection_state.UpdateConnectionState(state, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe connection state has changed. This update must be used only to show a human-readable description of the connection state
- Attributes:
- ID (
str):UpdateConnectionState - Args:
- state (
telegram.api.types.ConnectionState): - The new connection state
- state (
- Returns:
- Update
- Raises:
telegram.Error
-
ID= 'updateConnectionState'¶
-
static
read(q: dict, *args) → pytglib.api.types.update_connection_state.UpdateConnectionState¶
pytglib.api.types.update_delete_messages module¶
-
class
pytglib.api.types.update_delete_messages.UpdateDeleteMessages(chat_id, message_ids, is_permanent, from_cache, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectSome messages were deleted
- Attributes:
- ID (
str):UpdateDeleteMessages - Args:
- chat_id (
int): - Chat identifier
- message_ids (List of
int): - Identifiers of the deleted messages
- is_permanent (
bool): - True, if the messages are permanently deleted by a user (as opposed to just becoming inaccessible)
- from_cache (
bool): - True, if the messages are deleted only from the cache and can possibly be retrieved again in the future
- chat_id (
- Returns:
- Update
- Raises:
telegram.Error
-
ID= 'updateDeleteMessages'¶
-
static
read(q: dict, *args) → pytglib.api.types.update_delete_messages.UpdateDeleteMessages¶
pytglib.api.types.update_favorite_stickers module¶
-
class
pytglib.api.types.update_favorite_stickers.UpdateFavoriteStickers(sticker_ids, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe list of favorite stickers was updated
- Attributes:
- ID (
str):UpdateFavoriteStickers - Args:
- sticker_ids (List of
int): - The new list of file identifiers of favorite stickers
- sticker_ids (List of
- Returns:
- Update
- Raises:
telegram.Error
-
ID= 'updateFavoriteStickers'¶
-
static
read(q: dict, *args) → pytglib.api.types.update_favorite_stickers.UpdateFavoriteStickers¶
pytglib.api.types.update_file module¶
-
class
pytglib.api.types.update_file.UpdateFile(file, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectInformation about a file was updated
- Attributes:
- ID (
str):UpdateFile - Args:
- file (
telegram.api.types.file): - New data about the file
- file (
- Returns:
- Update
- Raises:
telegram.Error
-
ID= 'updateFile'¶
-
static
read(q: dict, *args) → pytglib.api.types.update_file.UpdateFile¶
pytglib.api.types.update_file_generation_start module¶
-
class
pytglib.api.types.update_file_generation_start.UpdateFileGenerationStart(generation_id, original_path, destination_path, conversion, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe file generation process needs to be started by the application
- Attributes:
- ID (
str):UpdateFileGenerationStart - Args:
- generation_id (
int): - Unique identifier for the generation process
- original_path (
str): - The path to a file from which a new file is generated; may be empty
- destination_path (
str): - The path to a file that must be created and where the new file is generated
- conversion (
str): - String specifying the conversion applied to the original fileIf conversion is “#url#” than original_path contains an HTTP/HTTPS URL of a file, which must be downloaded by the application
- generation_id (
- Returns:
- Update
- Raises:
telegram.Error
-
ID= 'updateFileGenerationStart'¶
-
static
read(q: dict, *args) → pytglib.api.types.update_file_generation_start.UpdateFileGenerationStart¶
pytglib.api.types.update_file_generation_stop module¶
-
class
pytglib.api.types.update_file_generation_stop.UpdateFileGenerationStop(generation_id, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectFile generation is no longer needed
- Attributes:
- ID (
str):UpdateFileGenerationStop - Args:
- generation_id (
int): - Unique identifier for the generation process
- generation_id (
- Returns:
- Update
- Raises:
telegram.Error
-
ID= 'updateFileGenerationStop'¶
-
static
read(q: dict, *args) → pytglib.api.types.update_file_generation_stop.UpdateFileGenerationStop¶
pytglib.api.types.update_have_pending_notifications module¶
-
class
pytglib.api.types.update_have_pending_notifications.UpdateHavePendingNotifications(have_delayed_notifications, have_unreceived_notifications, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectDescribes whether there are some pending notification updates. Can be used to prevent application from killing, while there are some pending notifications
- Attributes:
- ID (
str):UpdateHavePendingNotifications - Args:
- have_delayed_notifications (
bool): - True, if there are some delayed notification updates, which will be sent soon
- have_unreceived_notifications (
bool): - True, if there can be some yet unreceived notifications, which are being fetched from the server
- have_delayed_notifications (
- Returns:
- Update
- Raises:
telegram.Error
-
ID= 'updateHavePendingNotifications'¶
-
static
read(q: dict, *args) → pytglib.api.types.update_have_pending_notifications.UpdateHavePendingNotifications¶
pytglib.api.types.update_installed_sticker_sets module¶
-
class
pytglib.api.types.update_installed_sticker_sets.UpdateInstalledStickerSets(is_masks, sticker_set_ids, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe list of installed sticker sets was updated
- Attributes:
- ID (
str):UpdateInstalledStickerSets - Args:
- is_masks (
bool): - True, if the list of installed mask sticker sets was updated
- sticker_set_ids (List of
int): - The new list of installed ordinary sticker sets
- is_masks (
- Returns:
- Update
- Raises:
telegram.Error
-
ID= 'updateInstalledStickerSets'¶
-
static
read(q: dict, *args) → pytglib.api.types.update_installed_sticker_sets.UpdateInstalledStickerSets¶
pytglib.api.types.update_language_pack_strings module¶
-
class
pytglib.api.types.update_language_pack_strings.UpdateLanguagePackStrings(localization_target, language_pack_id, strings, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectSome language pack strings have been updated
- Attributes:
- ID (
str):UpdateLanguagePackStrings - Args:
- localization_target (
str): - Localization target to which the language pack belongs
- language_pack_id (
str): - Identifier of the updated language pack
- strings (List of
telegram.api.types.languagePackString): - List of changed language pack strings
- localization_target (
- Returns:
- Update
- Raises:
telegram.Error
-
ID= 'updateLanguagePackStrings'¶
-
static
read(q: dict, *args) → pytglib.api.types.update_language_pack_strings.UpdateLanguagePackStrings¶
pytglib.api.types.update_message_content module¶
-
class
pytglib.api.types.update_message_content.UpdateMessageContent(chat_id, message_id, new_content, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe message content has changed
- Attributes:
- ID (
str):UpdateMessageContent - Args:
- chat_id (
int): - Chat identifier
- message_id (
int): - Message identifier
- new_content (
telegram.api.types.MessageContent): - New message content
- chat_id (
- Returns:
- Update
- Raises:
telegram.Error
-
ID= 'updateMessageContent'¶
-
static
read(q: dict, *args) → pytglib.api.types.update_message_content.UpdateMessageContent¶
pytglib.api.types.update_message_content_opened module¶
-
class
pytglib.api.types.update_message_content_opened.UpdateMessageContentOpened(chat_id, message_id, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe message content was opened. Updates voice note messages to “listened”, video note messages to “viewed” and starts the TTL timer for self-destructing messages
- Attributes:
- ID (
str):UpdateMessageContentOpened - Args:
- chat_id (
int): - Chat identifier
- message_id (
int): - Message identifier
- chat_id (
- Returns:
- Update
- Raises:
telegram.Error
-
ID= 'updateMessageContentOpened'¶
-
static
read(q: dict, *args) → pytglib.api.types.update_message_content_opened.UpdateMessageContentOpened¶
pytglib.api.types.update_message_edited module¶
-
class
pytglib.api.types.update_message_edited.UpdateMessageEdited(chat_id, message_id, edit_date, reply_markup, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA message was edited. Changes in the message content will come in a separate updateMessageContent
- Attributes:
- ID (
str):UpdateMessageEdited - Args:
- chat_id (
int): - Chat identifier
- message_id (
int): - Message identifier
- edit_date (
int): - Point in time (Unix timestamp) when the message was edited
- reply_markup (
telegram.api.types.ReplyMarkup): - New message reply markup; may be null
- chat_id (
- Returns:
- Update
- Raises:
telegram.Error
-
ID= 'updateMessageEdited'¶
-
static
read(q: dict, *args) → pytglib.api.types.update_message_edited.UpdateMessageEdited¶
pytglib.api.types.update_message_live_location_viewed module¶
-
class
pytglib.api.types.update_message_live_location_viewed.UpdateMessageLiveLocationViewed(chat_id, message_id, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA message with a live location was viewed. When the update is received, the application is supposed to update the live location
- Attributes:
- ID (
str):UpdateMessageLiveLocationViewed - Args:
- chat_id (
int): - Identifier of the chat with the live location message
- message_id (
int): - Identifier of the message with live location
- chat_id (
- Returns:
- Update
- Raises:
telegram.Error
-
ID= 'updateMessageLiveLocationViewed'¶
-
static
read(q: dict, *args) → pytglib.api.types.update_message_live_location_viewed.UpdateMessageLiveLocationViewed¶
pytglib.api.types.update_message_mention_read module¶
-
class
pytglib.api.types.update_message_mention_read.UpdateMessageMentionRead(chat_id, message_id, unread_mention_count, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA message with an unread mention was read
- Attributes:
- ID (
str):UpdateMessageMentionRead - Args:
- chat_id (
int): - Chat identifier
- message_id (
int): - Message identifier
- unread_mention_count (
int): - The new number of unread mention messages left in the chat
- chat_id (
- Returns:
- Update
- Raises:
telegram.Error
-
ID= 'updateMessageMentionRead'¶
-
static
read(q: dict, *args) → pytglib.api.types.update_message_mention_read.UpdateMessageMentionRead¶
pytglib.api.types.update_message_send_acknowledged module¶
-
class
pytglib.api.types.update_message_send_acknowledged.UpdateMessageSendAcknowledged(chat_id, message_id, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA request to send a message has reached the Telegram server. This doesn’t mean that the message will be sent successfully or even that the send message request will be processed. This update will be sent only if the option “use_quick_ack” is set to true. This update may be sent multiple times for the same message
- Attributes:
- ID (
str):UpdateMessageSendAcknowledged - Args:
- chat_id (
int): - The chat identifier of the sent message
- message_id (
int): - A temporary message identifier
- chat_id (
- Returns:
- Update
- Raises:
telegram.Error
-
ID= 'updateMessageSendAcknowledged'¶
-
static
read(q: dict, *args) → pytglib.api.types.update_message_send_acknowledged.UpdateMessageSendAcknowledged¶
pytglib.api.types.update_message_send_failed module¶
-
class
pytglib.api.types.update_message_send_failed.UpdateMessageSendFailed(message, old_message_id, error_code, error_message, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA message failed to send. Be aware that some messages being sent can be irrecoverably deleted, in which case updateDeleteMessages will be received instead of this update
- Attributes:
- ID (
str):UpdateMessageSendFailed - Args:
- message (
telegram.api.types.message): - The failed to send message
- old_message_id (
int): - The previous temporary message identifier
- error_code (
int): - An error code
- error_message (
str): - Error message
- message (
- Returns:
- Update
- Raises:
telegram.Error
-
ID= 'updateMessageSendFailed'¶
-
static
read(q: dict, *args) → pytglib.api.types.update_message_send_failed.UpdateMessageSendFailed¶
pytglib.api.types.update_message_send_succeeded module¶
-
class
pytglib.api.types.update_message_send_succeeded.UpdateMessageSendSucceeded(message, old_message_id, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA message has been successfully sent
- Attributes:
- ID (
str):UpdateMessageSendSucceeded - Args:
- message (
telegram.api.types.message): - The sent messageUsually only the message identifier, date, and content are changed, but almost all other fields can also change
- old_message_id (
int): - The previous temporary message identifier
- message (
- Returns:
- Update
- Raises:
telegram.Error
-
ID= 'updateMessageSendSucceeded'¶
-
static
read(q: dict, *args) → pytglib.api.types.update_message_send_succeeded.UpdateMessageSendSucceeded¶
pytglib.api.types.update_message_views module¶
pytglib.api.types.update_new_callback_query module¶
-
class
pytglib.api.types.update_new_callback_query.UpdateNewCallbackQuery(id, sender_user_id, chat_id, message_id, chat_instance, payload, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA new incoming callback query; for bots only
- Attributes:
- ID (
str):UpdateNewCallbackQuery - Args:
- id (
int): - Unique query identifier
- sender_user_id (
int): - Identifier of the user who sent the query
- chat_id (
int): - Identifier of the chat where the query was sent
- message_id (
int): - Identifier of the message from which the query originated
- chat_instance (
int): - Identifier that uniquely corresponds to the chat to which the message was sent
- payload (
telegram.api.types.CallbackQueryPayload): - Query payload
- id (
- Returns:
- Update
- Raises:
telegram.Error
-
ID= 'updateNewCallbackQuery'¶
-
static
read(q: dict, *args) → pytglib.api.types.update_new_callback_query.UpdateNewCallbackQuery¶
pytglib.api.types.update_new_chat module¶
-
class
pytglib.api.types.update_new_chat.UpdateNewChat(chat, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA new chat has been loaded/created. This update is guaranteed to come before the chat identifier is returned to the application. The chat field changes will be reported through separate updates
- Attributes:
- ID (
str):UpdateNewChat - Args:
- chat (
telegram.api.types.chat): - The chat
- chat (
- Returns:
- Update
- Raises:
telegram.Error
-
ID= 'updateNewChat'¶
-
static
read(q: dict, *args) → pytglib.api.types.update_new_chat.UpdateNewChat¶
pytglib.api.types.update_new_chosen_inline_result module¶
-
class
pytglib.api.types.update_new_chosen_inline_result.UpdateNewChosenInlineResult(sender_user_id, user_location, query, result_id, inline_message_id, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe user has chosen a result of an inline query; for bots only
- Attributes:
- ID (
str):UpdateNewChosenInlineResult - Args:
- sender_user_id (
int): - Identifier of the user who sent the query
- user_location (
telegram.api.types.location): - User location; may be null
- query (
str): - Text of the query
- result_id (
str): - Identifier of the chosen result
- inline_message_id (
str): - Identifier of the sent inline message, if known
- sender_user_id (
- Returns:
- Update
- Raises:
telegram.Error
-
ID= 'updateNewChosenInlineResult'¶
-
static
read(q: dict, *args) → pytglib.api.types.update_new_chosen_inline_result.UpdateNewChosenInlineResult¶
pytglib.api.types.update_new_custom_event module¶
-
class
pytglib.api.types.update_new_custom_event.UpdateNewCustomEvent(event, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA new incoming event; for bots only
- Attributes:
- ID (
str):UpdateNewCustomEvent - Args:
- event (
str): - A JSON-serialized event
- event (
- Returns:
- Update
- Raises:
telegram.Error
-
ID= 'updateNewCustomEvent'¶
-
static
read(q: dict, *args) → pytglib.api.types.update_new_custom_event.UpdateNewCustomEvent¶
pytglib.api.types.update_new_custom_query module¶
-
class
pytglib.api.types.update_new_custom_query.UpdateNewCustomQuery(id, data, timeout, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA new incoming query; for bots only
- Attributes:
- ID (
str):UpdateNewCustomQuery - Args:
- id (
int): - The query identifier
- data (
str): - JSON-serialized query data
- timeout (
int): - Query timeout
- id (
- Returns:
- Update
- Raises:
telegram.Error
-
ID= 'updateNewCustomQuery'¶
-
static
read(q: dict, *args) → pytglib.api.types.update_new_custom_query.UpdateNewCustomQuery¶
pytglib.api.types.update_new_inline_callback_query module¶
-
class
pytglib.api.types.update_new_inline_callback_query.UpdateNewInlineCallbackQuery(id, sender_user_id, inline_message_id, chat_instance, payload, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA new incoming callback query from a message sent via a bot; for bots only
- Attributes:
- ID (
str):UpdateNewInlineCallbackQuery - Args:
- id (
int): - Unique query identifier
- sender_user_id (
int): - Identifier of the user who sent the query
- inline_message_id (
str): - Identifier of the inline message from which the query originated
- chat_instance (
int): - An identifier uniquely corresponding to the chat a message was sent to
- payload (
telegram.api.types.CallbackQueryPayload): - Query payload
- id (
- Returns:
- Update
- Raises:
telegram.Error
-
ID= 'updateNewInlineCallbackQuery'¶
-
static
read(q: dict, *args) → pytglib.api.types.update_new_inline_callback_query.UpdateNewInlineCallbackQuery¶
pytglib.api.types.update_new_inline_query module¶
-
class
pytglib.api.types.update_new_inline_query.UpdateNewInlineQuery(id, sender_user_id, user_location, chat_type, query, offset, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA new incoming inline query; for bots only
- Attributes:
- ID (
str):UpdateNewInlineQuery - Args:
- id (
int): - Unique query identifier
- sender_user_id (
int): - Identifier of the user who sent the query
- user_location (
telegram.api.types.location): - User location; may be null
- chat_type (
telegram.api.types.ChatType): - The type of the chat from which the query originated; may be null if unknown
- query (
str): - Text of the query
- offset (
str): - Offset of the first entry to return
- id (
- Returns:
- Update
- Raises:
telegram.Error
-
ID= 'updateNewInlineQuery'¶
-
static
read(q: dict, *args) → pytglib.api.types.update_new_inline_query.UpdateNewInlineQuery¶
pytglib.api.types.update_new_message module¶
-
class
pytglib.api.types.update_new_message.UpdateNewMessage(message, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA new message was received; can also be an outgoing message
- Attributes:
- ID (
str):UpdateNewMessage - Args:
- message (
telegram.api.types.message): - The new message
- message (
- Returns:
- Update
- Raises:
telegram.Error
-
ID= 'updateNewMessage'¶
-
static
read(q: dict, *args) → pytglib.api.types.update_new_message.UpdateNewMessage¶
pytglib.api.types.update_new_pre_checkout_query module¶
-
class
pytglib.api.types.update_new_pre_checkout_query.UpdateNewPreCheckoutQuery(id, sender_user_id, currency, total_amount, invoice_payload, shipping_option_id, order_info, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA new incoming pre-checkout query; for bots only. Contains full information about a checkout
- Attributes:
- ID (
str):UpdateNewPreCheckoutQuery - Args:
- id (
int): - Unique query identifier
- sender_user_id (
int): - Identifier of the user who sent the query
- currency (
str): - Currency for the product price
- total_amount (
int): - Total price for the product, in the smallest units of the currency
- invoice_payload (
bytes): - Invoice payload
- shipping_option_id (
str): - Identifier of a shipping option chosen by the user; may be empty if not applicable
- order_info (
telegram.api.types.orderInfo): - Information about the order; may be null
- id (
- Returns:
- Update
- Raises:
telegram.Error
-
ID= 'updateNewPreCheckoutQuery'¶
-
static
read(q: dict, *args) → pytglib.api.types.update_new_pre_checkout_query.UpdateNewPreCheckoutQuery¶
pytglib.api.types.update_new_shipping_query module¶
-
class
pytglib.api.types.update_new_shipping_query.UpdateNewShippingQuery(id, sender_user_id, invoice_payload, shipping_address, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA new incoming shipping query; for bots only. Only for invoices with flexible price
- Attributes:
- ID (
str):UpdateNewShippingQuery - Args:
- id (
int): - Unique query identifier
- sender_user_id (
int): - Identifier of the user who sent the query
- invoice_payload (
str): - Invoice payload
- shipping_address (
telegram.api.types.address): - User shipping address
- id (
- Returns:
- Update
- Raises:
telegram.Error
-
ID= 'updateNewShippingQuery'¶
-
static
read(q: dict, *args) → pytglib.api.types.update_new_shipping_query.UpdateNewShippingQuery¶
pytglib.api.types.update_notification module¶
-
class
pytglib.api.types.update_notification.UpdateNotification(notification_group_id, notification, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA notification was changed
- Attributes:
- ID (
str):UpdateNotification - Args:
- notification_group_id (
int): - Unique notification group identifier
- notification (
telegram.api.types.notification): - Changed notification
- notification_group_id (
- Returns:
- Update
- Raises:
telegram.Error
-
ID= 'updateNotification'¶
-
static
read(q: dict, *args) → pytglib.api.types.update_notification.UpdateNotification¶
pytglib.api.types.update_notification_group module¶
-
class
pytglib.api.types.update_notification_group.UpdateNotificationGroup(notification_group_id, type, chat_id, notification_settings_chat_id, notification_sound_id, total_count, added_notifications, removed_notification_ids, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA list of active notifications in a notification group has changed
- Attributes:
- ID (
str):UpdateNotificationGroup - Args:
- notification_group_id (
int): - Unique notification group identifier
- type (
telegram.api.types.NotificationGroupType): - New type of the notification group
- chat_id (
int): - Identifier of a chat to which all notifications in the group belong
- notification_settings_chat_id (
int): - Chat identifier, which notification settings must be applied to the added notifications
- notification_sound_id (
int): - Identifier of the notification sound to be played; 0 if sound is disabled
- total_count (
int): - Total number of unread notifications in the group, can be bigger than number of active notifications
- added_notifications (List of
telegram.api.types.notification): - List of added group notifications, sorted by notification ID
- removed_notification_ids (List of
int): - Identifiers of removed group notifications, sorted by notification ID
- notification_group_id (
- Returns:
- Update
- Raises:
telegram.Error
-
ID= 'updateNotificationGroup'¶
-
static
read(q: dict, *args) → pytglib.api.types.update_notification_group.UpdateNotificationGroup¶
pytglib.api.types.update_option module¶
-
class
pytglib.api.types.update_option.UpdateOption(name, value, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectAn option changed its value
- Attributes:
- ID (
str):UpdateOption - Args:
- name (
str): - The option name
- value (
telegram.api.types.OptionValue): - The new option value
- name (
- Returns:
- Update
- Raises:
telegram.Error
-
ID= 'updateOption'¶
-
static
read(q: dict, *args) → pytglib.api.types.update_option.UpdateOption¶
pytglib.api.types.update_poll module¶
-
class
pytglib.api.types.update_poll.UpdatePoll(poll, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA poll was updated; for bots only
- Attributes:
- ID (
str):UpdatePoll - Args:
- poll (
telegram.api.types.poll): - New data about the poll
- poll (
- Returns:
- Update
- Raises:
telegram.Error
-
ID= 'updatePoll'¶
-
static
read(q: dict, *args) → pytglib.api.types.update_poll.UpdatePoll¶
pytglib.api.types.update_poll_answer module¶
-
class
pytglib.api.types.update_poll_answer.UpdatePollAnswer(poll_id, user_id, option_ids, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA user changed the answer to a poll; for bots only
- Attributes:
- ID (
str):UpdatePollAnswer - Args:
- poll_id (
int): - Unique poll identifier
- user_id (
int): - The user, who changed the answer to the poll
- option_ids (List of
int): - 0-based identifiers of answer options, chosen by the user
- poll_id (
- Returns:
- Update
- Raises:
telegram.Error
-
ID= 'updatePollAnswer'¶
-
static
read(q: dict, *args) → pytglib.api.types.update_poll_answer.UpdatePollAnswer¶
pytglib.api.types.update_recent_stickers module¶
-
class
pytglib.api.types.update_recent_stickers.UpdateRecentStickers(is_attached, sticker_ids, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe list of recently used stickers was updated
- Attributes:
- ID (
str):UpdateRecentStickers - Args:
- is_attached (
bool): - True, if the list of stickers attached to photo or video files was updated, otherwise the list of sent stickers is updated
- sticker_ids (List of
int): - The new list of file identifiers of recently used stickers
- is_attached (
- Returns:
- Update
- Raises:
telegram.Error
-
ID= 'updateRecentStickers'¶
-
static
read(q: dict, *args) → pytglib.api.types.update_recent_stickers.UpdateRecentStickers¶
pytglib.api.types.update_saved_animations module¶
-
class
pytglib.api.types.update_saved_animations.UpdateSavedAnimations(animation_ids, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe list of saved animations was updated
- Attributes:
- ID (
str):UpdateSavedAnimations - Args:
- animation_ids (List of
int): - The new list of file identifiers of saved animations
- animation_ids (List of
- Returns:
- Update
- Raises:
telegram.Error
-
ID= 'updateSavedAnimations'¶
-
static
read(q: dict, *args) → pytglib.api.types.update_saved_animations.UpdateSavedAnimations¶
pytglib.api.types.update_scope_notification_settings module¶
-
class
pytglib.api.types.update_scope_notification_settings.UpdateScopeNotificationSettings(scope, notification_settings, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectNotification settings for some type of chats were updated
- Attributes:
- ID (
str):UpdateScopeNotificationSettings - Args:
- scope (
telegram.api.types.NotificationSettingsScope): - Types of chats for which notification settings were updated
- notification_settings (
telegram.api.types.scopeNotificationSettings): - The new notification settings
- scope (
- Returns:
- Update
- Raises:
telegram.Error
-
ID= 'updateScopeNotificationSettings'¶
-
static
read(q: dict, *args) → pytglib.api.types.update_scope_notification_settings.UpdateScopeNotificationSettings¶
pytglib.api.types.update_secret_chat module¶
-
class
pytglib.api.types.update_secret_chat.UpdateSecretChat(secret_chat, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectSome data of a secret chat has changed. This update is guaranteed to come before the secret chat identifier is returned to the application
- Attributes:
- ID (
str):UpdateSecretChat - Args:
- secret_chat (
telegram.api.types.secretChat): - New data about the secret chat
- secret_chat (
- Returns:
- Update
- Raises:
telegram.Error
-
ID= 'updateSecretChat'¶
-
static
read(q: dict, *args) → pytglib.api.types.update_secret_chat.UpdateSecretChat¶
pytglib.api.types.update_selected_background module¶
-
class
pytglib.api.types.update_selected_background.UpdateSelectedBackground(for_dark_theme, background, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe selected background has changed
- Attributes:
- ID (
str):UpdateSelectedBackground - Args:
- for_dark_theme (
bool): - True, if background for dark theme has changed
- background (
telegram.api.types.background): - The new selected background; may be null
- for_dark_theme (
- Returns:
- Update
- Raises:
telegram.Error
-
ID= 'updateSelectedBackground'¶
-
static
read(q: dict, *args) → pytglib.api.types.update_selected_background.UpdateSelectedBackground¶
pytglib.api.types.update_service_notification module¶
-
class
pytglib.api.types.update_service_notification.UpdateServiceNotification(type, content, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA service notification from the server was received. Upon receiving this the application must show a popup with the content of the notification
- Attributes:
- ID (
str):UpdateServiceNotification - Args:
- type (
str): - Notification typeIf type begins with “AUTH_KEY_DROP_”, then two buttons “Cancel” and “Log out” must be shown under notification; if user presses the second, all local data must be destroyed using Destroy method
- content (
telegram.api.types.MessageContent): - Notification content
- type (
- Returns:
- Update
- Raises:
telegram.Error
-
ID= 'updateServiceNotification'¶
-
static
read(q: dict, *args) → pytglib.api.types.update_service_notification.UpdateServiceNotification¶
pytglib.api.types.update_supergroup module¶
-
class
pytglib.api.types.update_supergroup.UpdateSupergroup(supergroup, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectSome data of a supergroup or a channel has changed. This update is guaranteed to come before the supergroup identifier is returned to the application
- Attributes:
- ID (
str):UpdateSupergroup - Args:
- supergroup (
telegram.api.types.supergroup): - New data about the supergroup
- supergroup (
- Returns:
- Update
- Raises:
telegram.Error
-
ID= 'updateSupergroup'¶
-
static
read(q: dict, *args) → pytglib.api.types.update_supergroup.UpdateSupergroup¶
pytglib.api.types.update_supergroup_full_info module¶
-
class
pytglib.api.types.update_supergroup_full_info.UpdateSupergroupFullInfo(supergroup_id, supergroup_full_info, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectSome data in supergroupFullInfo has been changed
- Attributes:
- ID (
str):UpdateSupergroupFullInfo - Args:
- supergroup_id (
int): - Identifier of the supergroup or channel
- supergroup_full_info (
telegram.api.types.supergroupFullInfo): - New full information about the supergroup
- supergroup_id (
- Returns:
- Update
- Raises:
telegram.Error
-
ID= 'updateSupergroupFullInfo'¶
-
static
read(q: dict, *args) → pytglib.api.types.update_supergroup_full_info.UpdateSupergroupFullInfo¶
pytglib.api.types.update_terms_of_service module¶
-
class
pytglib.api.types.update_terms_of_service.UpdateTermsOfService(terms_of_service_id, terms_of_service, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectNew terms of service must be accepted by the user. If the terms of service are declined, then the deleteAccount method must be called with the reason “Decline ToS update”
- Attributes:
- ID (
str):UpdateTermsOfService - Args:
- terms_of_service_id (
str): - Identifier of the terms of service
- terms_of_service (
telegram.api.types.termsOfService): - The new terms of service
- terms_of_service_id (
- Returns:
- Update
- Raises:
telegram.Error
-
ID= 'updateTermsOfService'¶
-
static
read(q: dict, *args) → pytglib.api.types.update_terms_of_service.UpdateTermsOfService¶
pytglib.api.types.update_trending_sticker_sets module¶
-
class
pytglib.api.types.update_trending_sticker_sets.UpdateTrendingStickerSets(sticker_sets, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe list of trending sticker sets was updated or some of them were viewed
- Attributes:
- ID (
str):UpdateTrendingStickerSets - Args:
- sticker_sets (
telegram.api.types.trendingStickerSets): - The prefix of the list of trending sticker sets with the newest trending sticker sets
- sticker_sets (
- Returns:
- Update
- Raises:
telegram.Error
-
ID= 'updateTrendingStickerSets'¶
-
static
read(q: dict, *args) → pytglib.api.types.update_trending_sticker_sets.UpdateTrendingStickerSets¶
pytglib.api.types.update_unread_chat_count module¶
-
class
pytglib.api.types.update_unread_chat_count.UpdateUnreadChatCount(chat_list, total_count, unread_count, unread_unmuted_count, marked_as_unread_count, marked_as_unread_unmuted_count, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectNumber of unread chats, i.e. with unread messages or marked as unread, has changed. This update is sent only if the message database is used
- Attributes:
- ID (
str):UpdateUnreadChatCount - Args:
- chat_list (
telegram.api.types.ChatList): - The chat list with changed number of unread messages
- total_count (
int): - Approximate total number of chats in the chat list
- unread_count (
int): - Total number of unread chats
- unread_unmuted_count (
int): - Total number of unread unmuted chats
- marked_as_unread_count (
int): - Total number of chats marked as unread
- marked_as_unread_unmuted_count (
int): - Total number of unmuted chats marked as unread
- chat_list (
- Returns:
- Update
- Raises:
telegram.Error
-
ID= 'updateUnreadChatCount'¶
-
static
read(q: dict, *args) → pytglib.api.types.update_unread_chat_count.UpdateUnreadChatCount¶
pytglib.api.types.update_unread_message_count module¶
-
class
pytglib.api.types.update_unread_message_count.UpdateUnreadMessageCount(chat_list, unread_count, unread_unmuted_count, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectNumber of unread messages in a chat list has changed. This update is sent only if the message database is used
- Attributes:
- ID (
str):UpdateUnreadMessageCount - Args:
- chat_list (
telegram.api.types.ChatList): - The chat list with changed number of unread messages
- unread_count (
int): - Total number of unread messages
- unread_unmuted_count (
int): - Total number of unread messages in unmuted chats
- chat_list (
- Returns:
- Update
- Raises:
telegram.Error
-
ID= 'updateUnreadMessageCount'¶
-
static
read(q: dict, *args) → pytglib.api.types.update_unread_message_count.UpdateUnreadMessageCount¶
pytglib.api.types.update_user module¶
-
class
pytglib.api.types.update_user.UpdateUser(user, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectSome data of a user has changed. This update is guaranteed to come before the user identifier is returned to the application
- Attributes:
- ID (
str):UpdateUser - Args:
- user (
telegram.api.types.user): - New data about the user
- user (
- Returns:
- Update
- Raises:
telegram.Error
-
ID= 'updateUser'¶
-
static
read(q: dict, *args) → pytglib.api.types.update_user.UpdateUser¶
pytglib.api.types.update_user_chat_action module¶
pytglib.api.types.update_user_full_info module¶
-
class
pytglib.api.types.update_user_full_info.UpdateUserFullInfo(user_id, user_full_info, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectSome data in userFullInfo has been changed
- Attributes:
- ID (
str):UpdateUserFullInfo - Args:
- user_id (
int): - User identifier
- user_full_info (
telegram.api.types.userFullInfo): - New full information about the user
- user_id (
- Returns:
- Update
- Raises:
telegram.Error
-
ID= 'updateUserFullInfo'¶
-
static
read(q: dict, *args) → pytglib.api.types.update_user_full_info.UpdateUserFullInfo¶
pytglib.api.types.update_user_privacy_setting_rules module¶
-
class
pytglib.api.types.update_user_privacy_setting_rules.UpdateUserPrivacySettingRules(setting, rules, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectSome privacy setting rules have been changed
- Attributes:
- ID (
str):UpdateUserPrivacySettingRules - Args:
- setting (
telegram.api.types.UserPrivacySetting): - The privacy setting
- rules (
telegram.api.types.userPrivacySettingRules): - New privacy rules
- setting (
- Returns:
- Update
- Raises:
telegram.Error
-
ID= 'updateUserPrivacySettingRules'¶
-
static
read(q: dict, *args) → pytglib.api.types.update_user_privacy_setting_rules.UpdateUserPrivacySettingRules¶
pytglib.api.types.update_user_status module¶
-
class
pytglib.api.types.update_user_status.UpdateUserStatus(user_id, status, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe user went online or offline
- Attributes:
- ID (
str):UpdateUserStatus - Args:
- user_id (
int): - User identifier
- status (
telegram.api.types.UserStatus): - New status of the user
- user_id (
- Returns:
- Update
- Raises:
telegram.Error
-
ID= 'updateUserStatus'¶
-
static
read(q: dict, *args) → pytglib.api.types.update_user_status.UpdateUserStatus¶
pytglib.api.types.update_users_nearby module¶
-
class
pytglib.api.types.update_users_nearby.UpdateUsersNearby(users_nearby, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe list of users nearby has changed. The update is guaranteed to be sent only 60 seconds after a successful searchChatsNearby request
- Attributes:
- ID (
str):UpdateUsersNearby - Args:
- users_nearby (List of
telegram.api.types.chatNearby): - The new list of users nearby
- users_nearby (List of
- Returns:
- Update
- Raises:
telegram.Error
-
ID= 'updateUsersNearby'¶
-
static
read(q: dict, *args) → pytglib.api.types.update_users_nearby.UpdateUsersNearby¶
pytglib.api.types.updates module¶
-
class
pytglib.api.types.updates.Updates(updates, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains a list of updates
- Attributes:
- ID (
str):Updates - Args:
- updates (List of
telegram.api.types.Update): - List of updates
- updates (List of
- Returns:
- Updates
- Raises:
telegram.Error
-
ID= 'updates'¶
-
static
read(q: dict, *args) → pytglib.api.types.updates.Updates¶
pytglib.api.types.user module¶
-
class
pytglib.api.types.user.User(id, first_name, last_name, username, phone_number, status, profile_photo, is_contact, is_mutual_contact, is_verified, is_premium, is_support, restriction_reason, is_scam, is_fake, have_access, type, language_code, added_to_attachment_menu, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents a user
- Attributes:
- ID (
str):User - Args:
- id (
int): - User identifier
- first_name (
str): - First name of the user
- last_name (
str): - Last name of the user
- username (
str): - Username of the user
- phone_number (
str): - Phone number of the user
- status (
telegram.api.types.UserStatus): - Current online status of the user
- profile_photo (
telegram.api.types.profilePhoto): - Profile photo of the user; may be null
- is_contact (
bool): - The user is a contact of the current user
- is_mutual_contact (
bool): - The user is a contact of the current user and the current user is a contact of the user
- is_verified (
bool): - True, if the user is verified
- is_premium (
bool): - True, if the user is a Telegram Premium user
- is_support (
bool): - True, if the user is Telegram support account
- restriction_reason (
str): - If non-empty, it contains a human-readable description of the reason why access to this user must be restricted
- is_scam (
bool): - True, if many users reported this user as a scam
- is_fake (
bool): - True, if many users reported this user as a fake account
- have_access (
bool): - If false, the user is inaccessible, and the only information known about the user is inside this classIdentifier of the user can’t be passed to any method except GetUser
- type (
telegram.api.types.UserType): - Type of the user
- language_code (
str): - IETF language tag of the user’s language; only available to bots
- added_to_attachment_menu (
bool): - True, if the user added the current bot to attachment menu; only available to bots
- id (
- Returns:
- User
- Raises:
telegram.Error
-
ID= 'user'¶
-
static
read(q: dict, *args) → pytglib.api.types.user.User¶
pytglib.api.types.user_full_info module¶
-
class
pytglib.api.types.user_full_info.UserFullInfo(photo, is_blocked, can_be_called, supports_video_calls, has_private_calls, has_private_forwards, need_phone_number_privacy_exception, bio, group_in_common_count, bot_info, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains full information about a user
- Attributes:
- ID (
str):UserFullInfo - Args:
- photo (
telegram.api.types.chatPhoto): - User profile photo; may be null
- is_blocked (
bool): - True, if the user is blocked by the current user
- can_be_called (
bool): - True, if the user can be called
- supports_video_calls (
bool): - True, if a video call can be created with the user
- has_private_calls (
bool): - True, if the user can’t be called due to their privacy settings
- has_private_forwards (
bool): - True, if the user can’t be linked in forwarded messages due to their privacy settings
- need_phone_number_privacy_exception (
bool): - True, if the current user needs to explicitly allow to share their phone number with the user when the method addContact is used
- bio (
telegram.api.types.formattedText): - A short user bio; may be null for bots
- group_in_common_count (
int): - Number of group chats where both the other user and the current user are a member; 0 for the current user
- bot_info (
telegram.api.types.botInfo): - For bots, information about the bot; may be null
- photo (
- Returns:
- UserFullInfo
- Raises:
telegram.Error
-
ID= 'userFullInfo'¶
-
static
read(q: dict, *args) → pytglib.api.types.user_full_info.UserFullInfo¶
pytglib.api.types.user_privacy_setting module¶
-
class
pytglib.api.types.user_privacy_setting.UserPrivacySetting(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectDescribes available user privacy settings
No parameters required.
-
ID= 'userPrivacySetting'¶
-
static
read(q: dict, *args) → UserPrivacySettingAllowChatInvites or UserPrivacySettingAllowFindingByPhoneNumber or UserPrivacySettingShowPhoneNumber or UserPrivacySettingShowLinkInForwardedMessages or UserPrivacySettingAllowPeerToPeerCalls or UserPrivacySettingShowStatus or UserPrivacySettingAllowCalls or UserPrivacySettingShowProfilePhoto¶
-
pytglib.api.types.user_privacy_setting_allow_calls module¶
-
class
pytglib.api.types.user_privacy_setting_allow_calls.UserPrivacySettingAllowCalls(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA privacy setting for managing whether the user can be called
- Attributes:
- ID (
str):UserPrivacySettingAllowCalls
No parameters required.
- Returns:
- UserPrivacySetting
- Raises:
telegram.Error
-
ID= 'userPrivacySettingAllowCalls'¶
-
static
read(q: dict, *args) → pytglib.api.types.user_privacy_setting_allow_calls.UserPrivacySettingAllowCalls¶
pytglib.api.types.user_privacy_setting_allow_chat_invites module¶
-
class
pytglib.api.types.user_privacy_setting_allow_chat_invites.UserPrivacySettingAllowChatInvites(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA privacy setting for managing whether the user can be invited to chats
- Attributes:
- ID (
str):UserPrivacySettingAllowChatInvites
No parameters required.
- Returns:
- UserPrivacySetting
- Raises:
telegram.Error
-
ID= 'userPrivacySettingAllowChatInvites'¶
-
static
read(q: dict, *args) → pytglib.api.types.user_privacy_setting_allow_chat_invites.UserPrivacySettingAllowChatInvites¶
pytglib.api.types.user_privacy_setting_allow_finding_by_phone_number module¶
-
class
pytglib.api.types.user_privacy_setting_allow_finding_by_phone_number.UserPrivacySettingAllowFindingByPhoneNumber(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA privacy setting for managing whether the user can be found by their phone number. Checked only if the phone number is not known to the other user. Can be set only to “Allow contacts” or “Allow all”
- Attributes:
- ID (
str):UserPrivacySettingAllowFindingByPhoneNumber
No parameters required.
- Returns:
- UserPrivacySetting
- Raises:
telegram.Error
-
ID= 'userPrivacySettingAllowFindingByPhoneNumber'¶
-
static
read(q: dict, *args) → pytglib.api.types.user_privacy_setting_allow_finding_by_phone_number.UserPrivacySettingAllowFindingByPhoneNumber¶
pytglib.api.types.user_privacy_setting_allow_peer_to_peer_calls module¶
-
class
pytglib.api.types.user_privacy_setting_allow_peer_to_peer_calls.UserPrivacySettingAllowPeerToPeerCalls(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA privacy setting for managing whether peer-to-peer connections can be used for calls
- Attributes:
- ID (
str):UserPrivacySettingAllowPeerToPeerCalls
No parameters required.
- Returns:
- UserPrivacySetting
- Raises:
telegram.Error
-
ID= 'userPrivacySettingAllowPeerToPeerCalls'¶
-
static
read(q: dict, *args) → pytglib.api.types.user_privacy_setting_allow_peer_to_peer_calls.UserPrivacySettingAllowPeerToPeerCalls¶
pytglib.api.types.user_privacy_setting_rule module¶
-
class
pytglib.api.types.user_privacy_setting_rule.UserPrivacySettingRule(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents a single rule for managing privacy settings
No parameters required.
-
ID= 'userPrivacySettingRule'¶
-
static
read(q: dict, *args) → UserPrivacySettingRuleAllowAll or UserPrivacySettingRuleRestrictUsers or UserPrivacySettingRuleAllowChatMembers or UserPrivacySettingRuleRestrictAll or UserPrivacySettingRuleRestrictChatMembers or UserPrivacySettingRuleAllowUsers or UserPrivacySettingRuleAllowContacts or UserPrivacySettingRuleRestrictContacts¶
-
pytglib.api.types.user_privacy_setting_rule_allow_all module¶
-
class
pytglib.api.types.user_privacy_setting_rule_allow_all.UserPrivacySettingRuleAllowAll(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA rule to allow all users to do something
- Attributes:
- ID (
str):UserPrivacySettingRuleAllowAll
No parameters required.
- Returns:
- UserPrivacySettingRule
- Raises:
telegram.Error
-
ID= 'userPrivacySettingRuleAllowAll'¶
-
static
read(q: dict, *args) → pytglib.api.types.user_privacy_setting_rule_allow_all.UserPrivacySettingRuleAllowAll¶
pytglib.api.types.user_privacy_setting_rule_allow_chat_members module¶
-
class
pytglib.api.types.user_privacy_setting_rule_allow_chat_members.UserPrivacySettingRuleAllowChatMembers(chat_ids, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA rule to allow all members of certain specified basic groups and supergroups to doing something
- Attributes:
- ID (
str):UserPrivacySettingRuleAllowChatMembers - Args:
- chat_ids (List of
int): - The chat identifiers, total number of chats in all rules must not exceed 20
- chat_ids (List of
- Returns:
- UserPrivacySettingRule
- Raises:
telegram.Error
-
ID= 'userPrivacySettingRuleAllowChatMembers'¶
-
static
read(q: dict, *args) → pytglib.api.types.user_privacy_setting_rule_allow_chat_members.UserPrivacySettingRuleAllowChatMembers¶
pytglib.api.types.user_privacy_setting_rule_allow_contacts module¶
-
class
pytglib.api.types.user_privacy_setting_rule_allow_contacts.UserPrivacySettingRuleAllowContacts(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA rule to allow all of a user’s contacts to do something
- Attributes:
- ID (
str):UserPrivacySettingRuleAllowContacts
No parameters required.
- Returns:
- UserPrivacySettingRule
- Raises:
telegram.Error
-
ID= 'userPrivacySettingRuleAllowContacts'¶
-
static
read(q: dict, *args) → pytglib.api.types.user_privacy_setting_rule_allow_contacts.UserPrivacySettingRuleAllowContacts¶
pytglib.api.types.user_privacy_setting_rule_allow_users module¶
-
class
pytglib.api.types.user_privacy_setting_rule_allow_users.UserPrivacySettingRuleAllowUsers(user_ids, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA rule to allow certain specified users to do something
- Attributes:
- ID (
str):UserPrivacySettingRuleAllowUsers - Args:
- user_ids (List of
int): - The user identifiers, total number of users in all rules must not exceed 1000
- user_ids (List of
- Returns:
- UserPrivacySettingRule
- Raises:
telegram.Error
-
ID= 'userPrivacySettingRuleAllowUsers'¶
-
static
read(q: dict, *args) → pytglib.api.types.user_privacy_setting_rule_allow_users.UserPrivacySettingRuleAllowUsers¶
pytglib.api.types.user_privacy_setting_rule_restrict_all module¶
-
class
pytglib.api.types.user_privacy_setting_rule_restrict_all.UserPrivacySettingRuleRestrictAll(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA rule to restrict all users from doing something
- Attributes:
- ID (
str):UserPrivacySettingRuleRestrictAll
No parameters required.
- Returns:
- UserPrivacySettingRule
- Raises:
telegram.Error
-
ID= 'userPrivacySettingRuleRestrictAll'¶
-
static
read(q: dict, *args) → pytglib.api.types.user_privacy_setting_rule_restrict_all.UserPrivacySettingRuleRestrictAll¶
pytglib.api.types.user_privacy_setting_rule_restrict_chat_members module¶
-
class
pytglib.api.types.user_privacy_setting_rule_restrict_chat_members.UserPrivacySettingRuleRestrictChatMembers(chat_ids, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA rule to restrict all members of specified basic groups and supergroups from doing something
- Attributes:
- ID (
str):UserPrivacySettingRuleRestrictChatMembers - Args:
- chat_ids (List of
int): - The chat identifiers, total number of chats in all rules must not exceed 20
- chat_ids (List of
- Returns:
- UserPrivacySettingRule
- Raises:
telegram.Error
-
ID= 'userPrivacySettingRuleRestrictChatMembers'¶
-
static
read(q: dict, *args) → pytglib.api.types.user_privacy_setting_rule_restrict_chat_members.UserPrivacySettingRuleRestrictChatMembers¶
pytglib.api.types.user_privacy_setting_rule_restrict_contacts module¶
-
class
pytglib.api.types.user_privacy_setting_rule_restrict_contacts.UserPrivacySettingRuleRestrictContacts(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA rule to restrict all contacts of a user from doing something
- Attributes:
- ID (
str):UserPrivacySettingRuleRestrictContacts
No parameters required.
- Returns:
- UserPrivacySettingRule
- Raises:
telegram.Error
-
ID= 'userPrivacySettingRuleRestrictContacts'¶
-
static
read(q: dict, *args) → pytglib.api.types.user_privacy_setting_rule_restrict_contacts.UserPrivacySettingRuleRestrictContacts¶
pytglib.api.types.user_privacy_setting_rule_restrict_users module¶
-
class
pytglib.api.types.user_privacy_setting_rule_restrict_users.UserPrivacySettingRuleRestrictUsers(user_ids, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA rule to restrict all specified users from doing something
- Attributes:
- ID (
str):UserPrivacySettingRuleRestrictUsers - Args:
- user_ids (List of
int): - The user identifiers, total number of users in all rules must not exceed 1000
- user_ids (List of
- Returns:
- UserPrivacySettingRule
- Raises:
telegram.Error
-
ID= 'userPrivacySettingRuleRestrictUsers'¶
-
static
read(q: dict, *args) → pytglib.api.types.user_privacy_setting_rule_restrict_users.UserPrivacySettingRuleRestrictUsers¶
pytglib.api.types.user_privacy_setting_rules module¶
-
class
pytglib.api.types.user_privacy_setting_rules.UserPrivacySettingRules(rules, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA list of privacy rules. Rules are matched in the specified order. The first matched rule defines the privacy setting for a given user. If no rule matches, the action is not allowed
- Attributes:
- ID (
str):UserPrivacySettingRules - Args:
- rules (List of
telegram.api.types.UserPrivacySettingRule): - A list of rules
- rules (List of
- Returns:
- UserPrivacySettingRules
- Raises:
telegram.Error
-
ID= 'userPrivacySettingRules'¶
-
static
read(q: dict, *args) → pytglib.api.types.user_privacy_setting_rules.UserPrivacySettingRules¶
pytglib.api.types.user_privacy_setting_show_link_in_forwarded_messages module¶
-
class
pytglib.api.types.user_privacy_setting_show_link_in_forwarded_messages.UserPrivacySettingShowLinkInForwardedMessages(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA privacy setting for managing whether a link to the user’s account is included in forwarded messages
- Attributes:
- ID (
str):UserPrivacySettingShowLinkInForwardedMessages
No parameters required.
- Returns:
- UserPrivacySetting
- Raises:
telegram.Error
-
ID= 'userPrivacySettingShowLinkInForwardedMessages'¶
-
static
read(q: dict, *args) → pytglib.api.types.user_privacy_setting_show_link_in_forwarded_messages.UserPrivacySettingShowLinkInForwardedMessages¶
pytglib.api.types.user_privacy_setting_show_phone_number module¶
-
class
pytglib.api.types.user_privacy_setting_show_phone_number.UserPrivacySettingShowPhoneNumber(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA privacy setting for managing whether the user’s phone number is visible
- Attributes:
- ID (
str):UserPrivacySettingShowPhoneNumber
No parameters required.
- Returns:
- UserPrivacySetting
- Raises:
telegram.Error
-
ID= 'userPrivacySettingShowPhoneNumber'¶
-
static
read(q: dict, *args) → pytglib.api.types.user_privacy_setting_show_phone_number.UserPrivacySettingShowPhoneNumber¶
pytglib.api.types.user_privacy_setting_show_profile_photo module¶
-
class
pytglib.api.types.user_privacy_setting_show_profile_photo.UserPrivacySettingShowProfilePhoto(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA privacy setting for managing whether the user’s profile photo is visible
- Attributes:
- ID (
str):UserPrivacySettingShowProfilePhoto
No parameters required.
- Returns:
- UserPrivacySetting
- Raises:
telegram.Error
-
ID= 'userPrivacySettingShowProfilePhoto'¶
-
static
read(q: dict, *args) → pytglib.api.types.user_privacy_setting_show_profile_photo.UserPrivacySettingShowProfilePhoto¶
pytglib.api.types.user_privacy_setting_show_status module¶
-
class
pytglib.api.types.user_privacy_setting_show_status.UserPrivacySettingShowStatus(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA privacy setting for managing whether the user’s online status is visible
- Attributes:
- ID (
str):UserPrivacySettingShowStatus
No parameters required.
- Returns:
- UserPrivacySetting
- Raises:
telegram.Error
-
ID= 'userPrivacySettingShowStatus'¶
-
static
read(q: dict, *args) → pytglib.api.types.user_privacy_setting_show_status.UserPrivacySettingShowStatus¶
pytglib.api.types.user_profile_photo module¶
pytglib.api.types.user_profile_photos module¶
pytglib.api.types.user_status module¶
-
class
pytglib.api.types.user_status.UserStatus(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectDescribes the last time the user was online
No parameters required.
-
ID= 'userStatus'¶
-
static
read(q: dict, *args) → UserStatusLastMonth or UserStatusOffline or UserStatusEmpty or UserStatusOnline or UserStatusLastWeek or UserStatusRecently¶
-
pytglib.api.types.user_status_empty module¶
-
class
pytglib.api.types.user_status_empty.UserStatusEmpty(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe user status was never changed
- Attributes:
- ID (
str):UserStatusEmpty
No parameters required.
- Returns:
- UserStatus
- Raises:
telegram.Error
-
ID= 'userStatusEmpty'¶
-
static
read(q: dict, *args) → pytglib.api.types.user_status_empty.UserStatusEmpty¶
pytglib.api.types.user_status_last_month module¶
-
class
pytglib.api.types.user_status_last_month.UserStatusLastMonth(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe user is offline, but was online last month
- Attributes:
- ID (
str):UserStatusLastMonth
No parameters required.
- Returns:
- UserStatus
- Raises:
telegram.Error
-
ID= 'userStatusLastMonth'¶
-
static
read(q: dict, *args) → pytglib.api.types.user_status_last_month.UserStatusLastMonth¶
pytglib.api.types.user_status_last_week module¶
-
class
pytglib.api.types.user_status_last_week.UserStatusLastWeek(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe user is offline, but was online last week
- Attributes:
- ID (
str):UserStatusLastWeek
No parameters required.
- Returns:
- UserStatus
- Raises:
telegram.Error
-
ID= 'userStatusLastWeek'¶
-
static
read(q: dict, *args) → pytglib.api.types.user_status_last_week.UserStatusLastWeek¶
pytglib.api.types.user_status_offline module¶
-
class
pytglib.api.types.user_status_offline.UserStatusOffline(was_online, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe user is offline
- Attributes:
- ID (
str):UserStatusOffline - Args:
- was_online (
int): - Point in time (Unix timestamp) when the user was last online
- was_online (
- Returns:
- UserStatus
- Raises:
telegram.Error
-
ID= 'userStatusOffline'¶
-
static
read(q: dict, *args) → pytglib.api.types.user_status_offline.UserStatusOffline¶
pytglib.api.types.user_status_online module¶
-
class
pytglib.api.types.user_status_online.UserStatusOnline(expires, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe user is online
- Attributes:
- ID (
str):UserStatusOnline - Args:
- expires (
int): - Point in time (Unix timestamp) when the user’s online status will expire
- expires (
- Returns:
- UserStatus
- Raises:
telegram.Error
-
ID= 'userStatusOnline'¶
-
static
read(q: dict, *args) → pytglib.api.types.user_status_online.UserStatusOnline¶
pytglib.api.types.user_status_recently module¶
-
class
pytglib.api.types.user_status_recently.UserStatusRecently(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectThe user was online recently
- Attributes:
- ID (
str):UserStatusRecently
No parameters required.
- Returns:
- UserStatus
- Raises:
telegram.Error
-
ID= 'userStatusRecently'¶
-
static
read(q: dict, *args) → pytglib.api.types.user_status_recently.UserStatusRecently¶
pytglib.api.types.user_type module¶
-
class
pytglib.api.types.user_type.UserType(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents the type of a user. The following types are possible: regular users, deleted users and bots
No parameters required.
-
ID= 'userType'¶
-
static
read(q: dict, *args) → UserTypeBot or UserTypeUnknown or UserTypeDeleted or UserTypeRegular¶
-
pytglib.api.types.user_type_bot module¶
-
class
pytglib.api.types.user_type_bot.UserTypeBot(can_join_groups, can_read_all_group_messages, is_inline, inline_query_placeholder, need_location, can_be_added_to_attachment_menu, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA bot (see https://core.telegram.org/bots)
- Attributes:
- ID (
str):UserTypeBot - Args:
- can_join_groups (
bool): - True, if the bot can be invited to basic group and supergroup chats
- can_read_all_group_messages (
bool): - True, if the bot can read all messages in basic group or supergroup chats and not just those addressed to the botIn private and channel chats a bot can always read all messages
- is_inline (
bool): - True, if the bot supports inline queries
- inline_query_placeholder (
str): - Placeholder for inline queries (displayed on the application input field)
- need_location (
bool): - True, if the location of the user is expected to be sent with every inline query to this bot
- can_be_added_to_attachment_menu (
bool): - True, if the bot can be added to attachment menu
- can_join_groups (
- Returns:
- UserType
- Raises:
telegram.Error
-
ID= 'userTypeBot'¶
-
static
read(q: dict, *args) → pytglib.api.types.user_type_bot.UserTypeBot¶
pytglib.api.types.user_type_deleted module¶
-
class
pytglib.api.types.user_type_deleted.UserTypeDeleted(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA deleted user or deleted bot. No information on the user besides the user identifier is available. It is not possible to perform any active actions on this type of user
- Attributes:
- ID (
str):UserTypeDeleted
No parameters required.
- Returns:
- UserType
- Raises:
telegram.Error
-
ID= 'userTypeDeleted'¶
-
static
read(q: dict, *args) → pytglib.api.types.user_type_deleted.UserTypeDeleted¶
pytglib.api.types.user_type_regular module¶
-
class
pytglib.api.types.user_type_regular.UserTypeRegular(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectA regular user
- Attributes:
- ID (
str):UserTypeRegular
No parameters required.
- Returns:
- UserType
- Raises:
telegram.Error
-
ID= 'userTypeRegular'¶
-
static
read(q: dict, *args) → pytglib.api.types.user_type_regular.UserTypeRegular¶
pytglib.api.types.user_type_unknown module¶
-
class
pytglib.api.types.user_type_unknown.UserTypeUnknown(**kwargs)¶ Bases:
pytglib.api.utils.object.ObjectNo information on the user besides the user identifier is available, yet this user has not been deleted. This object is extremely rare and must be handled like a deleted user. It is not possible to perform any actions on users of this type
- Attributes:
- ID (
str):UserTypeUnknown
No parameters required.
- Returns:
- UserType
- Raises:
telegram.Error
-
ID= 'userTypeUnknown'¶
-
static
read(q: dict, *args) → pytglib.api.types.user_type_unknown.UserTypeUnknown¶
pytglib.api.types.users module¶
-
class
pytglib.api.types.users.Users(total_count, user_ids, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectRepresents a list of users
- Attributes:
- ID (
str):Users - Args:
- total_count (
int): - Approximate total number of users found
- user_ids (List of
int): - A list of user identifiers
- total_count (
- Returns:
- Users
- Raises:
telegram.Error
-
ID= 'users'¶
-
static
read(q: dict, *args) → pytglib.api.types.users.Users¶
pytglib.api.types.validated_order_info module¶
-
class
pytglib.api.types.validated_order_info.ValidatedOrderInfo(order_info_id, shipping_options, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectContains a temporary identifier of validated order information, which is stored for one hour. Also contains the available shipping options
- Attributes:
- ID (
str):ValidatedOrderInfo - Args:
- order_info_id (
str): - Temporary identifier of the order information
- shipping_options (List of
telegram.api.types.shippingOption): - Available shipping options
- order_info_id (
- Returns:
- ValidatedOrderInfo
- Raises:
telegram.Error
-
ID= 'validatedOrderInfo'¶
-
static
read(q: dict, *args) → pytglib.api.types.validated_order_info.ValidatedOrderInfo¶
pytglib.api.types.venue module¶
-
class
pytglib.api.types.venue.Venue(location, title, address, provider, id, type, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectDescribes a venue
- Attributes:
- ID (
str):Venue - Args:
- location (
telegram.api.types.location): - Venue location; as defined by the sender
- title (
str): - Venue name; as defined by the sender
- address (
str): - Venue address; as defined by the sender
- provider (
str): - Provider of the venue database; as defined by the senderCurrently, only “foursquare” and “gplaces” (Google Places) need to be supported
- id (
str): - Identifier of the venue in the provider database; as defined by the sender
- type (
str): - Type of the venue in the provider database; as defined by the sender
- location (
- Returns:
- Venue
- Raises:
telegram.Error
-
ID= 'venue'¶
-
static
read(q: dict, *args) → pytglib.api.types.venue.Venue¶
pytglib.api.types.video module¶
-
class
pytglib.api.types.video.Video(duration, width, height, file_name, mime_type, has_stickers, supports_streaming, minithumbnail, thumbnail, video, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectDescribes a video file
- Attributes:
- ID (
str):Video - Args:
- duration (
int): - Duration of the video, in seconds; as defined by the sender
- width (
int): - Video width; as defined by the sender
- height (
int): - Video height; as defined by the sender
- file_name (
str): - Original name of the file; as defined by the sender
- mime_type (
str): - MIME type of the file; as defined by the sender
- has_stickers (
bool): - True, if stickers were added to the videoThe list of corresponding sticker sets can be received using getAttachedStickerSets
- supports_streaming (
bool): - True, if the video is supposed to be streamed
- minithumbnail (
telegram.api.types.minithumbnail): - Video minithumbnail; may be null
- thumbnail (
telegram.api.types.thumbnail): - Video thumbnail in JPEG or MPEG4 format; as defined by the sender; may be null
- video (
telegram.api.types.file): - File containing the video
- duration (
- Returns:
- Video
- Raises:
telegram.Error
-
ID= 'video'¶
-
static
read(q: dict, *args) → pytglib.api.types.video.Video¶
pytglib.api.types.video_note module¶
-
class
pytglib.api.types.video_note.VideoNote(duration, length, minithumbnail, thumbnail, video, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectDescribes a video note. The video must be equal in width and height, cropped to a circle, and stored in MPEG4 format
- Attributes:
- ID (
str):VideoNote - Args:
- duration (
int): - Duration of the video, in seconds; as defined by the sender
- length (
int): - Video width and height; as defined by the sender
- minithumbnail (
telegram.api.types.minithumbnail): - Video minithumbnail; may be null
- thumbnail (
telegram.api.types.thumbnail): - Video thumbnail in JPEG format; as defined by the sender; may be null
- video (
telegram.api.types.file): - File containing the video
- duration (
- Returns:
- VideoNote
- Raises:
telegram.Error
-
ID= 'videoNote'¶
-
static
read(q: dict, *args) → pytglib.api.types.video_note.VideoNote¶
pytglib.api.types.voice_note module¶
-
class
pytglib.api.types.voice_note.VoiceNote(duration, waveform, mime_type, is_recognized, recognized_text, voice, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectDescribes a voice note. The voice note must be encoded with the Opus codec, and stored inside an OGG container. Voice notes can have only a single audio channel
- Attributes:
- ID (
str):VoiceNote - Args:
- duration (
int): - Duration of the voice note, in seconds; as defined by the sender
- waveform (
bytes): - A waveform representation of the voice note in 5-bit format
- mime_type (
str): - MIME type of the file; as defined by the sender
- is_recognized (
bool): - True, if speech recognition is completed; Premium users only
- recognized_text (
str): - Recognized text of the voice note; Premium users onlyCall recognizeSpeech to get recognized text of the voice note
- voice (
telegram.api.types.file): - File containing the voice note
- duration (
- Returns:
- VoiceNote
- Raises:
telegram.Error
-
ID= 'voiceNote'¶
-
static
read(q: dict, *args) → pytglib.api.types.voice_note.VoiceNote¶
pytglib.api.types.web_page module¶
-
class
pytglib.api.types.web_page.WebPage(url, display_url, type, site_name, title, description, photo, embed_url, embed_type, embed_width, embed_height, duration, author, animation, audio, document, sticker, video, video_note, voice_note, instant_view_version, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectDescribes a web page preview
- Attributes:
- ID (
str):WebPage - Args:
- url (
str): - Original URL of the link
- display_url (
str): - URL to display
- type (
str): - Type of the web pageCan be: article, photo, audio, video, document, profile, app, or something else
- site_name (
str): - Short name of the site (eg, Google Docs, App Store)
- title (
str): - Title of the content
- description (
telegram.api.types.formattedText): - Description of the content
- photo (
telegram.api.types.photo): - Image representing the content; may be null
- embed_url (
str): - URL to show in the embedded preview
- embed_type (
str): - MIME type of the embedded preview, (eg, text/html or video/mp4)
- embed_width (
int): - Width of the embedded preview
- embed_height (
int): - Height of the embedded preview
- duration (
int): - Duration of the content, in seconds
- author (
str): - Author of the content
- animation (
telegram.api.types.animation): - Preview of the content as an animation, if available; may be null
- audio (
telegram.api.types.audio): - Preview of the content as an audio file, if available; may be null
- document (
telegram.api.types.document): - Preview of the content as a document, if available; may be null
- sticker (
telegram.api.types.sticker): - Preview of the content as a sticker for small WEBP files, if available; may be null
- video (
telegram.api.types.video): - Preview of the content as a video, if available; may be null
- video_note (
telegram.api.types.videoNote): - Preview of the content as a video note, if available; may be null
- voice_note (
telegram.api.types.voiceNote): - Preview of the content as a voice note, if available; may be null
- instant_view_version (
int): - Version of instant view, available for the web page (currently, can be 1 or 2), 0 if none
- url (
- Returns:
- WebPage
- Raises:
telegram.Error
-
ID= 'webPage'¶
-
static
read(q: dict, *args) → pytglib.api.types.web_page.WebPage¶
pytglib.api.types.web_page_instant_view module¶
-
class
pytglib.api.types.web_page_instant_view.WebPageInstantView(page_blocks, view_count, version, is_rtl, is_full, feedback_link, **kwargs)¶ Bases:
pytglib.api.utils.object.ObjectDescribes an instant view page for a web page
- Attributes:
- ID (
str):WebPageInstantView - Args:
- page_blocks (List of
telegram.api.types.PageBlock): - Content of the web page
- view_count (
int): - Number of the instant view views; 0 if unknown
- version (
int): - Version of the instant view; currently, can be 1 or 2
- is_rtl (
bool): - True, if the instant view must be shown from right to left
- is_full (
bool): - True, if the instant view contains the full pageA network request might be needed to get the full web page instant view
- feedback_link (
telegram.api.types.InternalLinkType): - An internal link to be opened to leave feedback about the instant view
- page_blocks (List of
- Returns:
- WebPageInstantView
- Raises:
telegram.Error
-
ID= 'webPageInstantView'¶
-
static
read(q: dict, *args) → pytglib.api.types.web_page_instant_view.WebPageInstantView¶