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.0
Logo
python-telegram-bot
v20.0

Reference

  • telegram package
    • telegram.Bot
    • Available Types
      • telegram.Animation
      • telegram.Audio
      • telegram.BotCommand
      • telegram.BotCommandScope
      • telegram.BotCommandScopeAllChatAdministrators
      • telegram.BotCommandScopeAllGroupChats
      • telegram.BotCommandScopeAllPrivateChats
      • telegram.BotCommandScopeChat
      • telegram.BotCommandScopeChatAdministrators
      • telegram.BotCommandScopeChatMember
      • telegram.BotCommandScopeDefault
      • telegram.CallbackQuery
      • telegram.Chat
      • telegram.ChatAdministratorRights
      • telegram.ChatInviteLink
      • telegram.ChatJoinRequest
      • telegram.ChatLocation
      • telegram.ChatMember
      • telegram.ChatMemberAdministrator
      • telegram.ChatMemberBanned
      • telegram.ChatMemberLeft
      • telegram.ChatMemberMember
      • telegram.ChatMemberOwner
      • telegram.ChatMemberRestricted
      • telegram.ChatMemberUpdated
      • telegram.ChatPermissions
      • telegram.ChatPhoto
      • telegram.Contact
      • telegram.Dice
      • telegram.Document
      • telegram.File
      • telegram.ForceReply
      • telegram.ForumTopic
      • telegram.ForumTopicClosed
      • telegram.ForumTopicCreated
      • telegram.ForumTopicEdited
      • telegram.ForumTopicReopened
      • telegram.GeneralForumTopicHidden
      • telegram.GeneralForumTopicUnhidden
      • 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.MessageEntity
      • telegram.MessageId
      • telegram.PhotoSize
      • telegram.Poll
      • telegram.PollAnswer
      • telegram.PollOption
      • telegram.ProximityAlertTriggered
      • telegram.ReplyKeyboardMarkup
      • telegram.ReplyKeyboardRemove
      • 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.WriteAccessAllowed
    • Stickers
      • telegram.MaskPosition
      • telegram.Sticker
      • telegram.StickerSet
    • Inline Mode
      • telegram.ChosenInlineResult
      • 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
    • Payments
      • telegram.Invoice
      • telegram.LabeledPrice
      • telegram.OrderInfo
      • telegram.PreCheckoutQuery
      • telegram.ShippingAddress
      • telegram.ShippingOption
      • telegram.ShippingQuery
      • telegram.SuccessfulPayment
    • Games
      • telegram.Callbackgame
      • telegram.Game
      • telegram.GameHighScore
    • Passport
      • telegram.Credentials
      • telegram.DataCredentials
      • telegram.EncryptedCredentials
      • telegram.EncryptedPassportElement
      • telegram.FileCredentials
      • telegram.IdDocumentData
      • telegram.PassportData
      • telegram.PassportElementError
      • telegram.PassportElementErrorDataField
      • telegram.PassportElementErrorFile
      • telegram.PassportElementErrorFiles
      • telegram.PassportElementErrorFrontSide
      • telegram.PassportElementErrorReverseSide
      • telegram.PassportElementErrorSelfie
      • telegram.PassportElementErrorTranslationFile
      • telegram.PassportElementErrorTranslationFiles
      • telegram.PassportElementErrorUnspecified
      • telegram.PassportFile
      • telegram.PersonalDetails
      • telegram.ResidentialAddress
      • telegram.SecureData
      • telegram.SecureValue
  • telegram.ext package
    • telegram.ext.Application
    • telegram.ext.ApplicationBuilder
    • telegram.ext.ApplicationHandlerStop
    • telegram.ext.CallbackContext
    • telegram.ext.ContextTypes
    • telegram.ext.Defaults
    • telegram.ext.ExtBot
    • telegram.ext.Job
    • telegram.ext.JobQueue
    • telegram.ext.Updater
    • Handlers
      • telegram.ext.BaseHandler
      • telegram.ext.CallbackQueryHandler
      • telegram.ext.ChatJoinRequestHandler
      • telegram.ext.ChatMemberHandler
      • telegram.ext.ChosenInlineResultHandler
      • telegram.ext.CommandHandler
      • telegram.ext.ConversationHandler
      • telegram.ext.filters Module
      • telegram.ext.InlineQueryHandler
      • telegram.ext.MessageHandler
      • telegram.ext.PollAnswerHandler
      • telegram.ext.PollHandler
      • telegram.ext.PreCheckoutQueryHandler
      • telegram.ext.PrefixHandler
      • telegram.ext.ShippingQueryHandler
      • telegram.ext.StringCommandHandler
      • telegram.ext.StringRegexHandler
      • telegram.ext.TypeHandler
    • Persistence
      • telegram.ext.BasePersistence
      • telegram.ext.DictPersistence
      • telegram.ext.PersistenceInput
      • telegram.ext.PicklePersistence
    • Arbitrary Callback Data
      • telegram.ext.CallbackDataCache
      • telegram.ext.InvalidCallbackData
    • Rate Limiting
      • telegram.ext.BaseRateLimiter
      • telegram.ext.AIORateLimiter
  • 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

Resources

  • Examples
    • arbitrarycallbackdatabot.py
    • chatmemberbot.py
    • contexttypesbot.py
    • conversationbot.py
    • conversationbot2.py
    • customwebhookbot.py
    • deeplinking.py
    • echobot.py
    • errorhandlerbot.py
    • inlinebot.py
    • inlinekeyboard.py
    • inlinekeyboard2.py
    • nestedconversationbot.py
    • passportbot.py
    • paymentbot.py
    • persistentconversationbot.py
    • pollbot.py
    • rawapibot.py
    • timerbot.py
    • webappbot.py
  • Wiki

Project

  • Changelog
  • Website
  • GitHub Repository
  • Telegram Channel
  • Telegram User Group
  • How To Contribute
  • Contributor Covenant Code of Conduct
  v: latest
Versions
latest
stable
v20.0
v20.0b0
v20.0a6
v20.0a5
v20.0a4
v20.0a3
v20.0a2
v20.0a1
v20.0a0
v13.15
v13.14
v13.13
v13.12
v13.11
v13.10
v13.9
v13.8.1
v13.8
v13.7
v13.6
v13.5
v13.4.1
v13.4
v13.3
v13.2
v13.1
v13.0
v12.8
v12.7
v12.6.1
v12.6
v12.5.1
v12.5
v12.4.2
v12.4.1
v12.4.0
v12.3.0
v12.2.0
v12.1.1
v12.1.0
v12.0.0
v12.0.0b1
doc-improve-search
doc-fixes
Downloads
pdf
On Read the Docs
Project Home
Builds
Back to top
Edit this page

telegram.ChatInviteLink¶

class telegram.ChatInviteLink(invite_link, creator, creates_join_request, is_primary, is_revoked, expire_date=None, member_limit=None, name=None, pending_join_request_count=None, *, api_kwargs=None)[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. 0-32 characters.

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().

Next
telegram.ChatJoinRequest
Previous
telegram.ChatAdministratorRights
Copyright © 2015-2023, Leandro Toledo
Made with Sphinx and @pradyunsg's Furo
On this page
  • telegram.ChatInviteLink
    • ChatInviteLink
      • ChatInviteLink.invite_link
      • ChatInviteLink.creator
      • ChatInviteLink.creates_join_request
      • ChatInviteLink.is_primary
      • ChatInviteLink.is_revoked
      • ChatInviteLink.expire_date
      • ChatInviteLink.member_limit
      • ChatInviteLink.name
      • ChatInviteLink.pending_join_request_count
      • ChatInviteLink.de_json()