mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-06-18 15:55:26 +00:00
28 lines
900 B
Kotlin
28 lines
900 B
Kotlin
|
package dev.inmo.tgbotapi.extensions.api.chat.invite_links
|
||
|
|
||
|
import com.soywiz.klock.DateTime
|
||
|
import dev.inmo.tgbotapi.bot.TelegramBot
|
||
|
import dev.inmo.tgbotapi.requests.chat.invite_links.*
|
||
|
import dev.inmo.tgbotapi.types.*
|
||
|
import dev.inmo.tgbotapi.types.chat.abstracts.PublicChat
|
||
|
|
||
|
suspend fun TelegramBot.revokeChatInviteLink(
|
||
|
chatId: ChatIdentifier,
|
||
|
previousLink: String
|
||
|
) = execute(RevokeChatInviteLink(chatId, previousLink))
|
||
|
|
||
|
suspend fun TelegramBot.revokeChatInviteLink(
|
||
|
chat: PublicChat,
|
||
|
previousLink: String
|
||
|
) = revokeChatInviteLink(chat.id, previousLink)
|
||
|
|
||
|
suspend fun TelegramBot.revokeChatInviteLink(
|
||
|
chatId: ChatIdentifier,
|
||
|
previousLink: ChatInviteLink
|
||
|
) = revokeChatInviteLink(chatId, previousLink.inviteLink)
|
||
|
|
||
|
suspend fun TelegramBot.revokeChatInviteLink(
|
||
|
chat: PublicChat,
|
||
|
previousLink: ChatInviteLink
|
||
|
) = revokeChatInviteLink(chat, previousLink.inviteLink)
|