Contents Menu Expand Light mode Dark mode Auto light/dark mode
PTB has undergone significant changes in v20. Please read the documentation carefully and also check out the transition guide in the wiki.
python-telegram-bot
v20.0a0
Logo
python-telegram-bot
v20.0a0

Reference

  • telegram package
    • telegram.Animation
    • telegram.Audio
    • telegram.Bot
    • telegram.BotCommand
    • telegram.BotCommandScope
    • telegram.BotCommandScopeDefault
    • telegram.BotCommandScopeAllPrivateChats
    • telegram.BotCommandScopeAllGroupChats
    • telegram.BotCommandScopeAllChatAdministrators
    • telegram.BotCommandScopeChat
    • telegram.BotCommandScopeChatAdministrators
    • telegram.BotCommandScopeChatMember
    • telegram.CallbackQuery
    • telegram.Chat
    • telegram.ChatAdministratorRights
    • telegram.ChatInviteLink
    • telegram.ChatJoinRequest
    • telegram.ChatLocation
    • telegram.ChatMember
    • telegram.ChatMemberOwner
    • telegram.ChatMemberAdministrator
    • telegram.ChatMemberMember
    • telegram.ChatMemberRestricted
    • telegram.ChatMemberLeft
    • telegram.ChatMemberBanned
    • telegram.ChatMemberUpdated
    • telegram.ChatPermissions
    • telegram.ChatPhoto
    • telegram.Contact
    • telegram.Dice
    • telegram.Document
    • telegram.File
    • telegram.ForceReply
    • telegram.InlineKeyboardButton
    • telegram.InlineKeyboardMarkup
    • telegram.InputFile
    • telegram.InputMedia
    • telegram.InputMediaAnimation
    • telegram.InputMediaAudio
    • telegram.InputMediaDocument
    • telegram.InputMediaPhoto
    • telegram.InputMediaVideo
    • telegram.KeyboardButton
    • telegram.KeyboardButtonPollType
    • telegram.Location
    • telegram.LoginUrl
    • telegram.MenuButton
    • telegram.MenuButtonCommands
    • telegram.MenuButtonDefault
    • telegram.MenuButtonWebApp
    • telegram.Message
    • telegram.MessageAutoDeleteTimerChanged
    • telegram.MessageId
    • telegram.MessageEntity
    • telegram.PhotoSize
    • telegram.Poll
    • telegram.PollAnswer
    • telegram.PollOption
    • telegram.ProximityAlertTriggered
    • telegram.ReplyKeyboardRemove
    • telegram.ReplyKeyboardMarkup
    • telegram.SentWebAppMessage
    • telegram.TelegramObject
    • telegram.Update
    • telegram.User
    • telegram.UserProfilePhotos
    • telegram.Venue
    • telegram.Video
    • telegram.VideoChatEnded
    • telegram.VideoChatParticipantsInvited
    • telegram.VideoChatScheduled
    • telegram.VideoChatStarted
    • telegram.VideoNote
    • telegram.Voice
    • telegram.WebAppData
    • telegram.WebAppInfo
    • telegram.WebhookInfo
    • telegram.Sticker
    • telegram.StickerSet
    • telegram.MaskPosition
    • telegram.InlineQuery
    • telegram.InlineQueryResult
    • telegram.InlineQueryResultArticle
    • telegram.InlineQueryResultAudio
    • telegram.InlineQueryResultCachedAudio
    • telegram.InlineQueryResultCachedDocument
    • telegram.InlineQueryResultCachedGif
    • telegram.InlineQueryResultCachedMpeg4Gif
    • telegram.InlineQueryResultCachedPhoto
    • telegram.InlineQueryResultCachedSticker
    • telegram.InlineQueryResultCachedVideo
    • telegram.InlineQueryResultCachedVoice
    • telegram.InlineQueryResultContact
    • telegram.InlineQueryResultDocument
    • telegram.InlineQueryResultGame
    • telegram.InlineQueryResultGif
    • telegram.InlineQueryResultLocation
    • telegram.InlineQueryResultMpeg4Gif
    • telegram.InlineQueryResultPhoto
    • telegram.InlineQueryResultVenue
    • telegram.InlineQueryResultVideo
    • telegram.InlineQueryResultVoice
    • telegram.InputMessageContent
    • telegram.InputTextMessageContent
    • telegram.InputLocationMessageContent
    • telegram.InputVenueMessageContent
    • telegram.InputContactMessageContent
    • telegram.InputInvoiceMessageContent
    • telegram.ChosenInlineResult
    • telegram.LabeledPrice
    • telegram.Invoice
    • telegram.ShippingAddress
    • telegram.OrderInfo
    • telegram.ShippingOption
    • telegram.SuccessfulPayment
    • telegram.ShippingQuery
    • telegram.PreCheckoutQuery
    • telegram.Game
    • telegram.Callbackgame
    • telegram.GameHighScore
    • telegram.PassportElementError
    • telegram.PassportElementErrorFile
    • telegram.PassportElementErrorFiles
    • telegram.PassportElementErrorReverseSide
    • telegram.PassportElementErrorFrontSide
    • telegram.PassportElementErrorDataField
    • telegram.PassportElementErrorSelfie
    • telegram.PassportElementErrorTranslationFile
    • telegram.PassportElementErrorTranslationFiles
    • telegram.PassportElementErrorUnspecified
    • telegram.Credentials
    • telegram.DataCredentials
    • telegram.SecureData
    • telegram.SecureValue
    • telegram.FileCredentials
    • telegram.IdDocumentData
    • telegram.PersonalDetails
    • telegram.ResidentialAddress
    • telegram.PassportData
    • telegram.PassportFile
    • telegram.EncryptedPassportElement
    • telegram.EncryptedCredentials
  • telegram.ext package
    • telegram.ext.ExtBot
    • telegram.ext.ApplicationBuilder
    • telegram.ext.Application
    • telegram.ext.ApplicationHandlerStop
    • telegram.ext.Updater
    • telegram.ext.CallbackContext
    • telegram.ext.Job
    • telegram.ext.JobQueue
    • telegram.ext.ContextTypes
    • telegram.ext.Defaults
    • telegram.ext.Handler
    • telegram.ext.CallbackQueryHandler
    • telegram.ext.ChatJoinRequestHandler
    • telegram.ext.ChatMemberHandler
    • telegram.ext.ChosenInlineResultHandler
    • telegram.ext.CommandHandler
    • telegram.ext.ConversationHandler
    • telegram.ext.InlineQueryHandler
    • telegram.ext.MessageHandler
    • telegram.ext.filters Module
    • telegram.ext.PollAnswerHandler
    • telegram.ext.PollHandler
    • telegram.ext.PreCheckoutQueryHandler
    • telegram.ext.PrefixHandler
    • telegram.ext.ShippingQueryHandler
    • telegram.ext.StringCommandHandler
    • telegram.ext.StringRegexHandler
    • telegram.ext.TypeHandler
    • telegram.ext.BasePersistence
    • telegram.ext.PersistenceInput
    • telegram.ext.PicklePersistence
    • telegram.ext.DictPersistence
    • telegram.ext.CallbackDataCache
    • telegram.ext.InvalidCallbackData
  • Auxiliary modules
    • telegram.constants Module
    • telegram.error Module
    • telegram.helpers Module
    • telegram.request Module
      • telegram.request.BaseRequest
      • telegram.request.RequestData
      • telegram.request.HTTPXRequest
    • telegram.warnings Module
  • Telegrams Bot API Docs

Project

  • Changelog
  • Website
  • GitHub Repository
  • Telegram Channel
  • Telegram User Group
  • How To Contribute
  • Contributor Covenant Code of Conduct
Back to top
Edit this page

telegram.ChatInviteLink#

class telegram.ChatInviteLink(*args, **kwargs)[source]#

Bases: telegram.TelegramObject

This object represents an invite link for a chat.

Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their invite_link, creator, creates_join_request, is_primary and is_revoked are equal.

New in version 13.4.

Changed in version 20.0:

  • The argument & attribute creates_join_request is now required to comply with the Bot API.

  • Comparing objects of this class now also takes creates_join_request into account.

Parameters
  • invite_link (str) – The invite link.

  • creator (telegram.User) – Creator of the link.

  • creates_join_request (bool) –

    True, if users joining the chat via the link need to be approved by chat administrators.

    New in version 13.8.

  • is_primary (bool) – True, if the link is primary.

  • is_revoked (bool) – True, if the link is revoked.

  • expire_date (datetime.datetime, optional) – Date when the link will expire or has been expired.

  • member_limit (int, optional) – Maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999.

  • name (str, optional) –

    Invite link name. 0-32 characters.

    New in version 13.8.

  • pending_join_request_count (int, optional) –

    Number of pending join requests created using this link.

    New in version 13.8.

invite_link[source]#

The invite link. If the link was created by another chat administrator, then the second part of the link will be replaced with '…'.

Type

str

creator[source]#

Creator of the link.

Type

telegram.User

creates_join_request[source]#

True, if users joining the chat via the link need to be approved by chat administrators.

New in version 13.8.

Type

bool

is_primary[source]#

True, if the link is primary.

Type

bool

is_revoked[source]#

True, if the link is revoked.

Type

bool

expire_date[source]#

Optional. Date when the link will expire or has been expired.

Type

datetime.datetime

member_limit[source]#

Optional. Maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999.

Type

int

name[source]#

Optional. Invite link name.

New in version 13.8.

Type

str

pending_join_request_count[source]#

Optional. Number of pending join requests created using this link.

New in version 13.8.

Type

int

classmethod de_json(data, bot)[source]#

See telegram.TelegramObject.de_json().

to_dict()[source]#

See telegram.TelegramObject.to_dict().

Next
telegram.ChatJoinRequest
Previous
telegram.ChatAdministratorRights
Copyright © 2015-2021, Leandro Toledo
Made with Sphinx and @pradyunsg's Furo