1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-06-01 23:45:25 +00:00
tgbotapi/TelegramBotAPI-extensions-api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/games/GetGameHighScoresByChat.kt

55 lines
1.5 KiB
Kotlin
Raw Normal View History

package dev.inmo.tgbotapi.extensions.api.games
2020-02-15 09:33:04 +00:00
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
2020-02-15 09:33:04 +00:00
import com.github.insanusmokrassar.TelegramBotAPI.requests.games.GetGameHighScoresByChat
import com.github.insanusmokrassar.TelegramBotAPI.types.*
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.Chat
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.ContentMessage
import com.github.insanusmokrassar.TelegramBotAPI.types.message.content.GameContent
suspend fun TelegramBot.getGameScore(
2020-02-15 09:33:04 +00:00
userId: UserId,
chatId: ChatId,
messageId: MessageIdentifier
) = execute(
GetGameHighScoresByChat(userId, chatId, messageId)
)
suspend fun TelegramBot.getGameScore(
2020-02-15 09:33:04 +00:00
user: CommonUser,
chatId: ChatId,
messageId: MessageIdentifier
) = getGameScore(
user.id, chatId, messageId
)
suspend fun TelegramBot.getGameScore(
2020-02-15 09:33:04 +00:00
userId: UserId,
chat: Chat,
messageId: MessageIdentifier
) = getGameScore(
userId, chat.id, messageId
)
suspend fun TelegramBot.getGameScore(
2020-02-15 09:33:04 +00:00
user: CommonUser,
chat: Chat,
messageId: MessageIdentifier
) = getGameScore(
user.id, chat.id, messageId
)
suspend fun TelegramBot.getGameScore(
2020-02-15 09:33:04 +00:00
userId: UserId,
message: ContentMessage<GameContent>
) = getGameScore(
userId, message.chat.id, message.messageId
)
suspend fun TelegramBot.getGameScore(
2020-02-15 09:33:04 +00:00
user: CommonUser,
message: ContentMessage<GameContent>
) = getGameScore(
user.id, message.chat.id, message.messageId
)