2020-02-15 09:33:04 +00:00
|
|
|
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.send.games
|
|
|
|
|
2020-10-04 07:18:24 +00:00
|
|
|
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
2020-02-15 09:33:04 +00:00
|
|
|
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.games.SendGame
|
|
|
|
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
|
|
|
|
import com.github.insanusmokrassar.TelegramBotAPI.types.MessageIdentifier
|
|
|
|
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.KeyboardMarkup
|
|
|
|
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.Chat
|
|
|
|
import com.github.insanusmokrassar.TelegramBotAPI.types.games.Game
|
|
|
|
|
2020-10-04 07:18:24 +00:00
|
|
|
suspend fun TelegramBot.sendGame(
|
2020-02-15 09:33:04 +00:00
|
|
|
chatId: ChatIdentifier,
|
|
|
|
gameShortName: String,
|
|
|
|
disableNotification: Boolean = false,
|
|
|
|
replyToMessageId: MessageIdentifier? = null,
|
|
|
|
replyMarkup: KeyboardMarkup? = null
|
|
|
|
) = execute(
|
|
|
|
SendGame(
|
|
|
|
chatId, gameShortName, disableNotification, replyToMessageId, replyMarkup
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
2020-10-04 07:18:24 +00:00
|
|
|
suspend fun TelegramBot.sendGame(
|
2020-02-15 09:33:04 +00:00
|
|
|
chat: Chat,
|
|
|
|
gameShortName: String,
|
|
|
|
disableNotification: Boolean = false,
|
|
|
|
replyToMessageId: MessageIdentifier? = null,
|
|
|
|
replyMarkup: KeyboardMarkup? = null
|
|
|
|
) = sendGame(
|
|
|
|
chat.id, gameShortName, disableNotification, replyToMessageId, replyMarkup
|
|
|
|
)
|
|
|
|
|
2020-10-04 07:18:24 +00:00
|
|
|
suspend fun TelegramBot.sendGame(
|
2020-02-15 09:33:04 +00:00
|
|
|
chatId: ChatIdentifier,
|
|
|
|
game: Game,
|
|
|
|
disableNotification: Boolean = false,
|
|
|
|
replyToMessageId: MessageIdentifier? = null,
|
|
|
|
replyMarkup: KeyboardMarkup? = null
|
|
|
|
) = sendGame(
|
|
|
|
chatId, game.title, disableNotification, replyToMessageId, replyMarkup
|
|
|
|
)
|
|
|
|
|
2020-10-04 07:18:24 +00:00
|
|
|
suspend fun TelegramBot.sendGame(
|
2020-02-15 09:33:04 +00:00
|
|
|
chat: Chat,
|
|
|
|
game: Game,
|
|
|
|
disableNotification: Boolean = false,
|
|
|
|
replyToMessageId: MessageIdentifier? = null,
|
|
|
|
replyMarkup: KeyboardMarkup? = null
|
|
|
|
) = sendGame(
|
|
|
|
chat.id, game.title, disableNotification, replyToMessageId, replyMarkup
|
|
|
|
)
|