2020-10-04 10:57:39 +00:00
|
|
|
package dev.inmo.tgbotapi.extensions.api.chat.members
|
2020-02-15 09:33:04 +00:00
|
|
|
|
2020-10-04 11:06:30 +00:00
|
|
|
import dev.inmo.tgbotapi.bot.TelegramBot
|
|
|
|
import dev.inmo.tgbotapi.requests.chat.members.UnbanChatMember
|
|
|
|
import dev.inmo.tgbotapi.types.*
|
|
|
|
import dev.inmo.tgbotapi.types.chat.abstracts.PublicChat
|
2020-02-15 09:33:04 +00:00
|
|
|
|
2020-10-04 07:18:24 +00:00
|
|
|
suspend fun TelegramBot.unbanChatMember(
|
2020-02-15 09:33:04 +00:00
|
|
|
chatId: ChatIdentifier,
|
2020-11-05 17:48:23 +00:00
|
|
|
userId: UserId,
|
|
|
|
onlyIfBanned: Boolean? = null
|
|
|
|
) = execute(UnbanChatMember(chatId, userId, onlyIfBanned))
|
2020-02-15 09:33:04 +00:00
|
|
|
|
2020-10-04 07:18:24 +00:00
|
|
|
suspend fun TelegramBot.unbanChatMember(
|
2020-02-15 09:33:04 +00:00
|
|
|
chat: PublicChat,
|
2020-11-05 17:48:23 +00:00
|
|
|
userId: UserId,
|
|
|
|
onlyIfBanned: Boolean? = null
|
|
|
|
) = unbanChatMember(chat.id, userId, onlyIfBanned)
|
2020-02-15 09:33:04 +00:00
|
|
|
|
2020-10-04 07:18:24 +00:00
|
|
|
suspend fun TelegramBot.unbanChatMember(
|
2020-02-15 09:33:04 +00:00
|
|
|
chatId: ChatId,
|
2020-11-05 17:48:23 +00:00
|
|
|
user: User,
|
|
|
|
onlyIfBanned: Boolean? = null
|
|
|
|
) = unbanChatMember(chatId, user.id, onlyIfBanned)
|
2020-02-15 09:33:04 +00:00
|
|
|
|
2020-10-04 07:18:24 +00:00
|
|
|
suspend fun TelegramBot.unbanChatMember(
|
2020-02-15 09:33:04 +00:00
|
|
|
chat: PublicChat,
|
2020-11-05 17:48:23 +00:00
|
|
|
user: User,
|
|
|
|
onlyIfBanned: Boolean? = null
|
|
|
|
) = unbanChatMember(chat.id, user.id, onlyIfBanned)
|
2020-02-15 09:33:04 +00:00
|
|
|
|