Contents Menu Expand Light mode Dark mode Auto light/dark mode
aiogram 3.0.0b7 documentation
Logo
aiogram 3.0.0b7 documentation
  • Installation
  • Bot API
    • Bot
    • Client session
      • Use Custom API server
      • Base
      • aiohttp
    • Types
      • ChosenInlineResult
      • InlineQuery
      • InlineQueryResult
      • InlineQueryResultArticle
      • InlineQueryResultAudio
      • InlineQueryResultCachedAudio
      • InlineQueryResultCachedDocument
      • InlineQueryResultCachedGif
      • InlineQueryResultCachedMpeg4Gif
      • InlineQueryResultCachedPhoto
      • InlineQueryResultCachedSticker
      • InlineQueryResultCachedVideo
      • InlineQueryResultCachedVoice
      • InlineQueryResultContact
      • InlineQueryResultDocument
      • InlineQueryResultGame
      • InlineQueryResultGif
      • InlineQueryResultLocation
      • InlineQueryResultMpeg4Gif
      • InlineQueryResultPhoto
      • InlineQueryResultVenue
      • InlineQueryResultVideo
      • InlineQueryResultVoice
      • InputContactMessageContent
      • InputInvoiceMessageContent
      • InputLocationMessageContent
      • InputMessageContent
      • InputTextMessageContent
      • InputVenueMessageContent
      • SentWebAppMessage
      • Animation
      • Audio
      • BotCommand
      • BotCommandScope
      • BotCommandScopeAllChatAdministrators
      • BotCommandScopeAllGroupChats
      • BotCommandScopeAllPrivateChats
      • BotCommandScopeChat
      • BotCommandScopeChatAdministrators
      • BotCommandScopeChatMember
      • BotCommandScopeDefault
      • CallbackQuery
      • Chat
      • ChatAdministratorRights
      • ChatInviteLink
      • ChatJoinRequest
      • ChatLocation
      • ChatMember
      • ChatMemberAdministrator
      • ChatMemberBanned
      • ChatMemberLeft
      • ChatMemberMember
      • ChatMemberOwner
      • ChatMemberRestricted
      • ChatMemberUpdated
      • ChatPermissions
      • ChatPhoto
      • Contact
      • Dice
      • Document
      • File
      • ForceReply
      • ForumTopic
      • ForumTopicClosed
      • ForumTopicCreated
      • ForumTopicEdited
      • ForumTopicReopened
      • GeneralForumTopicHidden
      • GeneralForumTopicUnhidden
      • InlineKeyboardButton
      • InlineKeyboardMarkup
      • InputFile
      • InputMedia
      • InputMediaAnimation
      • InputMediaAudio
      • InputMediaDocument
      • InputMediaPhoto
      • InputMediaVideo
      • KeyboardButton
      • KeyboardButtonPollType
      • Location
      • LoginUrl
      • MenuButton
      • MenuButtonCommands
      • MenuButtonDefault
      • MenuButtonWebApp
      • Message
      • MessageAutoDeleteTimerChanged
      • MessageEntity
      • MessageId
      • PhotoSize
      • Poll
      • PollAnswer
      • PollOption
      • ProximityAlertTriggered
      • ReplyKeyboardMarkup
      • ReplyKeyboardRemove
      • ResponseParameters
      • User
      • UserProfilePhotos
      • Venue
      • Video
      • VideoChatEnded
      • VideoChatParticipantsInvited
      • VideoChatScheduled
      • VideoChatStarted
      • VideoNote
      • Voice
      • WebAppData
      • WebAppInfo
      • WriteAccessAllowed
      • EncryptedCredentials
      • EncryptedPassportElement
      • PassportData
      • PassportElementError
      • PassportElementErrorDataField
      • PassportElementErrorFile
      • PassportElementErrorFiles
      • PassportElementErrorFrontSide
      • PassportElementErrorReverseSide
      • PassportElementErrorSelfie
      • PassportElementErrorTranslationFile
      • PassportElementErrorTranslationFiles
      • PassportElementErrorUnspecified
      • PassportFile
      • Update
      • WebhookInfo
      • MaskPosition
      • Sticker
      • StickerSet
      • Invoice
      • LabeledPrice
      • OrderInfo
      • PreCheckoutQuery
      • ShippingAddress
      • ShippingOption
      • ShippingQuery
      • SuccessfulPayment
      • CallbackGame
      • Game
      • GameHighScore
      • ErrorEvent
    • Methods
      • answerCallbackQuery
      • approveChatJoinRequest
      • banChatMember
      • banChatSenderChat
      • close
      • closeForumTopic
      • closeGeneralForumTopic
      • copyMessage
      • createChatInviteLink
      • createForumTopic
      • declineChatJoinRequest
      • deleteChatPhoto
      • deleteChatStickerSet
      • deleteForumTopic
      • deleteMyCommands
      • editChatInviteLink
      • editForumTopic
      • editGeneralForumTopic
      • editMessageLiveLocation
      • exportChatInviteLink
      • forwardMessage
      • getChat
      • getChatAdministrators
      • getChatMember
      • getChatMemberCount
      • getChatMenuButton
      • getFile
      • getForumTopicIconStickers
      • getMe
      • getMyCommands
      • getMyDefaultAdministratorRights
      • getUserProfilePhotos
      • hideGeneralForumTopic
      • leaveChat
      • logOut
      • pinChatMessage
      • promoteChatMember
      • reopenForumTopic
      • reopenGeneralForumTopic
      • restrictChatMember
      • revokeChatInviteLink
      • sendAnimation
      • sendAudio
      • sendChatAction
      • sendContact
      • sendDice
      • sendDocument
      • sendLocation
      • sendMediaGroup
      • sendMessage
      • sendPhoto
      • sendPoll
      • sendVenue
      • sendVideo
      • sendVideoNote
      • sendVoice
      • setChatAdministratorCustomTitle
      • setChatDescription
      • setChatMenuButton
      • setChatPermissions
      • setChatPhoto
      • setChatStickerSet
      • setChatTitle
      • setMyCommands
      • setMyDefaultAdministratorRights
      • stopMessageLiveLocation
      • unbanChatMember
      • unbanChatSenderChat
      • unhideGeneralForumTopic
      • unpinAllChatMessages
      • unpinAllForumTopicMessages
      • unpinChatMessage
      • answerPreCheckoutQuery
      • answerShippingQuery
      • createInvoiceLink
      • sendInvoice
      • addStickerToSet
      • createNewStickerSet
      • deleteStickerFromSet
      • getCustomEmojiStickers
      • getStickerSet
      • sendSticker
      • setStickerPositionInSet
      • setStickerSetThumb
      • uploadStickerFile
      • getGameHighScores
      • sendGame
      • setGameScore
      • deleteWebhook
      • getUpdates
      • getWebhookInfo
      • setWebhook
      • setPassportDataErrors
      • deleteMessage
      • editMessageCaption
      • editMessageMedia
      • editMessageReplyMarkup
      • editMessageText
      • stopPoll
      • answerInlineQuery
      • answerWebAppQuery
    • Enums
      • BotCommandScopeType
      • ChatAction
      • ChatMemberStatus
      • ChatType
      • ContentType
      • DiceEmoji
      • InlineQueryResultType
      • InputMediaType
      • MaskPositionPoint
      • MenuButtonType
      • MessageEntityType
      • ParseMode
      • PollType
      • StickerType
      • TopicIconColor
      • UpdateType
    • How to download file?
    • How to upload file?
  • Handling events
    • Observer
    • Router
    • Dispatcher
    • Class based handlers
      • BaseHandler
      • CallbackQueryHandler
      • ChosenInlineResultHandler
      • ErrorHandler
      • InlineQueryHandler
      • MessageHandler
      • PollHandler
      • PreCheckoutQueryHandler
      • ShippingQueryHandler
      • ChatMemberHandler
    • Filtering events
      • Command
      • Text
      • ChatMemberUpdated
      • Magic filters
      • MagicData
      • Callback Data Factory & Filter
      • Exceptions
    • Middlewares
    • Finite State Machine
      • Storages
    • Flags
  • Utils
    • Keyboard builder
    • Translation
    • Chat action sender
    • WebApp
    • Callback answer
  • Changelog
  • Contributing
  v: dev-3.x
Versions
latest
dev-3.x
Downloads
pdf
html
epub
On Read the Docs
Project Home
Builds
Back to top
Edit this page

revokeChatInviteLink#

Returns: ChatInviteLink

class aiogram.methods.revoke_chat_invite_link.RevokeChatInviteLink(*, chat_id: Union[int, str], invite_link: str, **extra_data: Any)[source]#

Use this method to revoke an invite link created by the bot. If the primary link is revoked, a new link is automatically generated. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the revoked invite link as aiogram.types.chat_invite_link.ChatInviteLink object.

Source: https://core.telegram.org/bots/api#revokechatinvitelink

chat_id: Union[int, str]#

Unique identifier of the target chat or username of the target channel (in the format @channelusername)

invite_link: str#

The invite link to revoke

build_request(bot: Bot) → Request[source]#

Usage#

As bot method#

result: ChatInviteLink = await bot.revoke_chat_invite_link(...)

Method as object#

Imports:

  • from aiogram.methods.revoke_chat_invite_link import RevokeChatInviteLink

  • alias: from aiogram.methods import RevokeChatInviteLink

With specific bot#

result: ChatInviteLink = await bot(RevokeChatInviteLink(...))

As reply into Webhook in handler#

return RevokeChatInviteLink(...)

As shortcut from received object#

  • aiogram.types.chat.Chat.revoke_invite_link()

Next
sendAnimation
Previous
restrictChatMember
Copyright © 2023, aiogram Team
Made with Sphinx and @pradyunsg's Furo
On this page
  • revokeChatInviteLink
    • RevokeChatInviteLink
      • RevokeChatInviteLink.chat_id
      • RevokeChatInviteLink.invite_link
      • RevokeChatInviteLink.build_request()
    • Usage
      • As bot method
      • Method as object
        • With specific bot
        • As reply into Webhook in handler
      • As shortcut from received object