tgbotapi/TelegramBotAPI-extensions-api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/chat/members/GetChatMember.kt

27 lines
816 B
Kotlin

package dev.inmo.tgbotapi.extensions.api.chat.members
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
import com.github.insanusmokrassar.TelegramBotAPI.requests.chat.members.GetChatMember
import com.github.insanusmokrassar.TelegramBotAPI.types.*
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.PublicChat
suspend fun TelegramBot.getChatMember(
chatId: ChatIdentifier,
userId: UserId
) = execute(GetChatMember(chatId, userId))
suspend fun TelegramBot.getChatMember(
chat: PublicChat,
userId: UserId
) = getChatMember(chat.id, userId)
suspend fun TelegramBot.getChatMember(
chatId: ChatId,
user: User
) = getChatMember(chatId, user.id)
suspend fun TelegramBot.getChatMember(
chat: PublicChat,
user: User
) = getChatMember(chat.id, user.id)