mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-12-22 16:47:13 +00:00
replaces of RequestsExecutor by TelegramBot typealias in TelegramBotAPI-extensions-api
This commit is contained in:
parent
39ca29279f
commit
bec1255d67
@ -46,7 +46,8 @@
|
||||
|
||||
* `TelegramBotAPI-core`:
|
||||
* Now in forward info you can get `ForwardFromSupergroupInfo`
|
||||
|
||||
* `TelegramBotAPI-extensions-api`:
|
||||
* ALL REQUESTS EXECUTOR USAGES WERE REPLACED WITH `TelegramBot` TYPEALIAS. It should not bring any break changes
|
||||
### 0.28.4
|
||||
|
||||
* `Common`:
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.utils.TelegramAPIUrlsKeeper
|
||||
import io.ktor.client.HttpClient
|
||||
import io.ktor.client.HttpClientConfig
|
||||
@ -33,13 +33,13 @@ data class BotBuilder internal constructor(
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Created by [telegramBotWithCustomClientConfig] function [RequestsExecutor]. This executor will be preconfigured using [token] and
|
||||
* @return Created by [telegramBotWithCustomClientConfig] function [TelegramBot]. This executor will be preconfigured using [token] and
|
||||
* [block]
|
||||
*/
|
||||
fun telegramBot(
|
||||
token: String,
|
||||
block: BotBuilder.() -> Unit
|
||||
): RequestsExecutor = telegramBot(
|
||||
): TelegramBot = telegramBot(
|
||||
TelegramAPIUrlsKeeper(token),
|
||||
BotBuilder().apply(block).createHttpClient()
|
||||
)
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.Ktor.KtorRequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.utils.TelegramAPIUrlsKeeper
|
||||
import io.ktor.client.HttpClient
|
||||
import io.ktor.client.HttpClientConfig
|
||||
@ -13,7 +13,7 @@ import io.ktor.client.engine.HttpClientEngine
|
||||
fun telegramBot(
|
||||
urlsKeeper: TelegramAPIUrlsKeeper,
|
||||
client: HttpClient = HttpClient()
|
||||
): RequestsExecutor = KtorRequestsExecutor(
|
||||
): TelegramBot = KtorRequestsExecutor(
|
||||
urlsKeeper,
|
||||
client
|
||||
)
|
||||
@ -26,7 +26,7 @@ fun telegramBotWithCustomClientConfig(
|
||||
urlsKeeper: TelegramAPIUrlsKeeper,
|
||||
clientEngine: HttpClientEngine,
|
||||
clientConfig: HttpClientConfig<*>.() -> Unit = {}
|
||||
): RequestsExecutor = telegramBot(
|
||||
): TelegramBot = telegramBot(
|
||||
urlsKeeper,
|
||||
HttpClient(clientEngine, clientConfig)
|
||||
)
|
||||
@ -37,7 +37,7 @@ fun telegramBotWithCustomClientConfig(
|
||||
fun telegramBotWithCustomClientConfig(
|
||||
urlsKeeper: TelegramAPIUrlsKeeper,
|
||||
clientConfig: HttpClientConfig<*>.() -> Unit = {}
|
||||
): RequestsExecutor = telegramBot(
|
||||
): TelegramBot = telegramBot(
|
||||
urlsKeeper,
|
||||
HttpClient(clientConfig)
|
||||
)
|
||||
@ -47,7 +47,7 @@ fun telegramBotWithCustomClientConfig(
|
||||
*/
|
||||
fun telegramBot(
|
||||
token: String
|
||||
): RequestsExecutor = telegramBotWithCustomClientConfig(TelegramAPIUrlsKeeper(token))
|
||||
): TelegramBot = telegramBotWithCustomClientConfig(TelegramAPIUrlsKeeper(token))
|
||||
|
||||
/**
|
||||
* Allows to create bot using bot [token] and already prepared [client]
|
||||
@ -55,7 +55,7 @@ fun telegramBot(
|
||||
fun telegramBot(
|
||||
token: String,
|
||||
client: HttpClient
|
||||
): RequestsExecutor = telegramBot(TelegramAPIUrlsKeeper(token), client)
|
||||
): TelegramBot = telegramBot(TelegramAPIUrlsKeeper(token), client)
|
||||
|
||||
/**
|
||||
* Allows to create bot using bot [token] and configure [HttpClient] using [clientConfig]
|
||||
@ -63,7 +63,7 @@ fun telegramBot(
|
||||
fun telegramBotWithCustomClientConfig(
|
||||
token: String,
|
||||
clientConfig: HttpClientConfig<*>.() -> Unit
|
||||
): RequestsExecutor = telegramBotWithCustomClientConfig(TelegramAPIUrlsKeeper(token), clientConfig)
|
||||
): TelegramBot = telegramBotWithCustomClientConfig(TelegramAPIUrlsKeeper(token), clientConfig)
|
||||
|
||||
/**
|
||||
* Allows to create bot using bot [token] and specify [HttpClientEngine] by passing [clientEngine] param and optionally
|
||||
@ -73,4 +73,4 @@ fun telegramBot(
|
||||
token: String,
|
||||
clientEngine: HttpClientEngine,
|
||||
clientConfig: HttpClientConfig<*>.() -> Unit = {}
|
||||
): RequestsExecutor = telegramBotWithCustomClientConfig(TelegramAPIUrlsKeeper(token), clientEngine, clientConfig)
|
||||
): TelegramBot = telegramBotWithCustomClientConfig(TelegramAPIUrlsKeeper(token), clientEngine, clientConfig)
|
||||
|
@ -1,28 +1,28 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.DeleteMessage
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.MessageIdentifier
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.Chat
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.Message
|
||||
|
||||
suspend fun RequestsExecutor.deleteMessage(
|
||||
suspend fun TelegramBot.deleteMessage(
|
||||
chatId: ChatIdentifier,
|
||||
messageId: MessageIdentifier
|
||||
) = execute(
|
||||
DeleteMessage(chatId, messageId)
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.deleteMessage(
|
||||
suspend fun TelegramBot.deleteMessage(
|
||||
chat: Chat,
|
||||
messageId: MessageIdentifier
|
||||
) = deleteMessage(chat.id, messageId)
|
||||
|
||||
suspend fun RequestsExecutor.deleteMessage(
|
||||
suspend fun TelegramBot.deleteMessage(
|
||||
message: Message
|
||||
) = deleteMessage(message.chat, message.messageId)
|
||||
|
||||
suspend fun Message.delete(
|
||||
requestsExecutor: RequestsExecutor
|
||||
requestsExecutor: TelegramBot
|
||||
) = requestsExecutor.deleteMessage(this)
|
||||
|
@ -1,13 +1,13 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.ForwardMessage
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.MessageIdentifier
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.Chat
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.Message
|
||||
|
||||
suspend fun RequestsExecutor.forwardMessage(
|
||||
suspend fun TelegramBot.forwardMessage(
|
||||
fromChatId: ChatIdentifier,
|
||||
toChatId: ChatIdentifier,
|
||||
messageId: MessageIdentifier,
|
||||
@ -16,34 +16,34 @@ suspend fun RequestsExecutor.forwardMessage(
|
||||
ForwardMessage(fromChatId, toChatId, messageId, disableNotification)
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.forwardMessage(
|
||||
suspend fun TelegramBot.forwardMessage(
|
||||
fromChat: Chat,
|
||||
toChatId: ChatIdentifier,
|
||||
messageId: MessageIdentifier,
|
||||
disableNotification: Boolean = false
|
||||
) = forwardMessage(fromChat.id, toChatId, messageId, disableNotification)
|
||||
|
||||
suspend fun RequestsExecutor.forwardMessage(
|
||||
suspend fun TelegramBot.forwardMessage(
|
||||
fromChatId: ChatIdentifier,
|
||||
toChat: Chat,
|
||||
messageId: MessageIdentifier,
|
||||
disableNotification: Boolean = false
|
||||
) = forwardMessage(fromChatId, toChat.id, messageId, disableNotification)
|
||||
|
||||
suspend fun RequestsExecutor.forwardMessage(
|
||||
suspend fun TelegramBot.forwardMessage(
|
||||
fromChat: Chat,
|
||||
toChat: Chat,
|
||||
messageId: MessageIdentifier,
|
||||
disableNotification: Boolean = false
|
||||
) = forwardMessage(fromChat.id, toChat.id, messageId, disableNotification)
|
||||
|
||||
suspend fun RequestsExecutor.forwardMessage(
|
||||
suspend fun TelegramBot.forwardMessage(
|
||||
toChatId: ChatIdentifier,
|
||||
message: Message,
|
||||
disableNotification: Boolean = false
|
||||
) = forwardMessage(message.chat, toChatId, message.messageId, disableNotification)
|
||||
|
||||
suspend fun RequestsExecutor.forwardMessage(
|
||||
suspend fun TelegramBot.forwardMessage(
|
||||
toChat: Chat,
|
||||
message: Message,
|
||||
disableNotification: Boolean = false
|
||||
|
@ -1,11 +1,11 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.GetUpdates
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.update.abstracts.Update
|
||||
|
||||
suspend fun RequestsExecutor.getUpdates(
|
||||
suspend fun TelegramBot.getUpdates(
|
||||
offset: UpdateIdentifier? = null,
|
||||
limit: Int = getUpdatesLimit.last,
|
||||
timeout: Seconds? = null,
|
||||
@ -16,7 +16,7 @@ suspend fun RequestsExecutor.getUpdates(
|
||||
)
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.getUpdates(
|
||||
suspend fun TelegramBot.getUpdates(
|
||||
lastUpdate: Update,
|
||||
limit: Int = getUpdatesLimit.last,
|
||||
timeout: Seconds? = null,
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.extensions.api.edit.LiveLocation.editLiveLocation
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.extensions.api.edit.LiveLocation.stopLiveLocation
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.SendLocation
|
||||
@ -19,7 +19,7 @@ import kotlin.math.ceil
|
||||
|
||||
private val livePeriodDelayMillis = (livePeriodLimit.last - 60L) * 1000L
|
||||
class LiveLocation internal constructor(
|
||||
private val requestsExecutor: RequestsExecutor,
|
||||
private val requestsExecutor: TelegramBot,
|
||||
scope: CoroutineScope,
|
||||
autoCloseTimeDelay: Double,
|
||||
initMessage: ContentMessage<LocationContent>
|
||||
@ -66,7 +66,7 @@ class LiveLocation internal constructor(
|
||||
}
|
||||
}
|
||||
|
||||
suspend fun RequestsExecutor.startLiveLocation(
|
||||
suspend fun TelegramBot.startLiveLocation(
|
||||
scope: CoroutineScope,
|
||||
chatId: ChatIdentifier,
|
||||
latitude: Double,
|
||||
@ -97,7 +97,7 @@ suspend fun RequestsExecutor.startLiveLocation(
|
||||
)
|
||||
}
|
||||
|
||||
suspend fun RequestsExecutor.startLiveLocation(
|
||||
suspend fun TelegramBot.startLiveLocation(
|
||||
scope: CoroutineScope,
|
||||
chat: Chat,
|
||||
latitude: Double,
|
||||
@ -110,7 +110,7 @@ suspend fun RequestsExecutor.startLiveLocation(
|
||||
scope, chat.id, latitude, longitude, liveTimeMillis, disableNotification, replyToMessageId, replyMarkup
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.startLiveLocation(
|
||||
suspend fun TelegramBot.startLiveLocation(
|
||||
scope: CoroutineScope,
|
||||
chatId: ChatId,
|
||||
location: Location,
|
||||
@ -122,7 +122,7 @@ suspend fun RequestsExecutor.startLiveLocation(
|
||||
scope, chatId, location.latitude, location.longitude, liveTimeMillis, disableNotification, replyToMessageId, replyMarkup
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.startLiveLocation(
|
||||
suspend fun TelegramBot.startLiveLocation(
|
||||
scope: CoroutineScope,
|
||||
chat: Chat,
|
||||
location: Location,
|
||||
|
@ -1,13 +1,13 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.StopPoll
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.Chat
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.Message
|
||||
|
||||
suspend fun RequestsExecutor.stopPoll(
|
||||
suspend fun TelegramBot.stopPoll(
|
||||
chatId: ChatIdentifier,
|
||||
messageId: MessageIdentifier,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
@ -15,19 +15,19 @@ suspend fun RequestsExecutor.stopPoll(
|
||||
StopPoll(chatId, messageId, replyMarkup)
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.stopPoll(
|
||||
suspend fun TelegramBot.stopPoll(
|
||||
chat: Chat,
|
||||
messageId: MessageIdentifier,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = stopPoll(chat.id, messageId, replyMarkup)
|
||||
|
||||
suspend fun RequestsExecutor.stopPoll(
|
||||
suspend fun TelegramBot.stopPoll(
|
||||
chatId: ChatId,
|
||||
message: Message,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = stopPoll(chatId, message.messageId, replyMarkup)
|
||||
|
||||
suspend fun RequestsExecutor.stopPoll(
|
||||
suspend fun TelegramBot.stopPoll(
|
||||
chat: Chat,
|
||||
message: Message,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
|
@ -1,11 +1,11 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.answers
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.answers.AnswerCallbackQuery
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.CallbackQuery.CallbackQuery
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.CallbackQueryIdentifier
|
||||
|
||||
suspend fun RequestsExecutor.answerCallbackQuery(
|
||||
suspend fun TelegramBot.answerCallbackQuery(
|
||||
callbackQueryId: CallbackQueryIdentifier,
|
||||
text: String? = null,
|
||||
showAlert: Boolean? = null,
|
||||
@ -13,7 +13,7 @@ suspend fun RequestsExecutor.answerCallbackQuery(
|
||||
cachedTimeSeconds: Int? = null
|
||||
) = execute(AnswerCallbackQuery(callbackQueryId, text, showAlert, url, cachedTimeSeconds))
|
||||
|
||||
suspend fun RequestsExecutor.answerCallbackQuery(
|
||||
suspend fun TelegramBot.answerCallbackQuery(
|
||||
callbackQuery: CallbackQuery,
|
||||
text: String? = null,
|
||||
showAlert: Boolean? = null,
|
||||
|
@ -1,12 +1,12 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.answers
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.answers.AnswerInlineQuery
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.InlineQueryResult
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.abstracts.InlineQuery
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueryIdentifier
|
||||
|
||||
suspend fun RequestsExecutor.answerInlineQuery(
|
||||
suspend fun TelegramBot.answerInlineQuery(
|
||||
inlineQueryID: InlineQueryIdentifier,
|
||||
results: List<InlineQueryResult> = emptyList(),
|
||||
cachedTime: Int? = null,
|
||||
@ -18,7 +18,7 @@ suspend fun RequestsExecutor.answerInlineQuery(
|
||||
AnswerInlineQuery(inlineQueryID, results, cachedTime, isPersonal, nextOffset, switchPmText, switchPmParameter)
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.answerInlineQuery(
|
||||
suspend fun TelegramBot.answerInlineQuery(
|
||||
inlineQuery: InlineQuery,
|
||||
results: List<InlineQueryResult> = emptyList(),
|
||||
cachedTime: Int? = null,
|
||||
|
@ -1,23 +1,23 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.answers.payments
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.answers.payments.AnswerPreCheckoutQueryError
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.answers.payments.AnswerPreCheckoutQueryOk
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.PreCheckoutQueryId
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.payments.PreCheckoutQuery
|
||||
|
||||
suspend fun RequestsExecutor.answerPreCheckoutQueryOk(
|
||||
suspend fun TelegramBot.answerPreCheckoutQueryOk(
|
||||
id: PreCheckoutQueryId
|
||||
) = execute(AnswerPreCheckoutQueryOk(id))
|
||||
suspend fun RequestsExecutor.answerPreCheckoutQueryOk(
|
||||
suspend fun TelegramBot.answerPreCheckoutQueryOk(
|
||||
preCheckoutQuery: PreCheckoutQuery
|
||||
) = answerPreCheckoutQueryOk(preCheckoutQuery.id)
|
||||
|
||||
suspend fun RequestsExecutor.answerPreCheckoutQueryError(
|
||||
suspend fun TelegramBot.answerPreCheckoutQueryError(
|
||||
id: PreCheckoutQueryId,
|
||||
error: String
|
||||
) = execute(AnswerPreCheckoutQueryError(id, error))
|
||||
suspend fun RequestsExecutor.answerPreCheckoutQueryError(
|
||||
suspend fun TelegramBot.answerPreCheckoutQueryError(
|
||||
preCheckoutQuery: PreCheckoutQuery,
|
||||
error: String
|
||||
) = answerPreCheckoutQueryError(preCheckoutQuery.id, error)
|
||||
|
@ -1,26 +1,26 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.answers.payments
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.answers.payments.AnswerShippingQueryError
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.answers.payments.AnswerShippingQueryOk
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ShippingQueryIdentifier
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.payments.ShippingOption
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.payments.ShippingQuery
|
||||
|
||||
suspend fun RequestsExecutor.answerShippingQueryOk(
|
||||
suspend fun TelegramBot.answerShippingQueryOk(
|
||||
id: ShippingQueryIdentifier,
|
||||
shippingOptions: List<ShippingOption>
|
||||
) = execute(AnswerShippingQueryOk(id, shippingOptions))
|
||||
suspend fun RequestsExecutor.answerShippingQueryOk(
|
||||
suspend fun TelegramBot.answerShippingQueryOk(
|
||||
shippingQuery: ShippingQuery,
|
||||
shippingOptions: List<ShippingOption>
|
||||
) = answerShippingQueryOk(shippingQuery.id, shippingOptions)
|
||||
|
||||
suspend fun RequestsExecutor.answerShippingQueryError(
|
||||
suspend fun TelegramBot.answerShippingQueryError(
|
||||
id: ShippingQueryIdentifier,
|
||||
error: String
|
||||
) = execute(AnswerShippingQueryError(id, error))
|
||||
suspend fun RequestsExecutor.answerShippingQueryError(
|
||||
suspend fun TelegramBot.answerShippingQueryError(
|
||||
shippingQuery: ShippingQuery,
|
||||
error: String
|
||||
) = answerShippingQueryError(shippingQuery.id, error)
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.bot
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.bot.GetMe
|
||||
|
||||
suspend fun RequestsExecutor.getMe() = execute(GetMe)
|
||||
suspend fun TelegramBot.getMe() = execute(GetMe)
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.bot
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.bot.GetMyCommands
|
||||
|
||||
suspend fun RequestsExecutor.getMyCommands() = execute(GetMyCommands)
|
||||
suspend fun TelegramBot.getMyCommands() = execute(GetMyCommands)
|
||||
|
@ -1,13 +1,13 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.bot
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.bot.SetMyCommands
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.BotCommand
|
||||
|
||||
suspend fun RequestsExecutor.setMyCommands(
|
||||
suspend fun TelegramBot.setMyCommands(
|
||||
commands: List<BotCommand>
|
||||
) = execute(SetMyCommands(commands))
|
||||
|
||||
suspend fun RequestsExecutor.setMyCommands(
|
||||
suspend fun TelegramBot.setMyCommands(
|
||||
vararg commands: BotCommand
|
||||
) = setMyCommands(commands.toList())
|
||||
|
@ -1,14 +1,14 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.chat
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.chat.ExportChatInviteLink
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.PublicChat
|
||||
|
||||
suspend fun RequestsExecutor.exportChatInviteLink(
|
||||
suspend fun TelegramBot.exportChatInviteLink(
|
||||
chatId: ChatIdentifier
|
||||
) = execute(ExportChatInviteLink(chatId))
|
||||
|
||||
suspend fun RequestsExecutor.exportChatInviteLink(
|
||||
suspend fun TelegramBot.exportChatInviteLink(
|
||||
chat: PublicChat
|
||||
) = exportChatInviteLink(chat.id)
|
||||
|
@ -1,14 +1,14 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.chat
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.chat.LeaveChat
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.PublicChat
|
||||
|
||||
suspend fun RequestsExecutor.leaveChat(
|
||||
suspend fun TelegramBot.leaveChat(
|
||||
chatId: ChatIdentifier
|
||||
) = execute(LeaveChat(chatId))
|
||||
|
||||
suspend fun RequestsExecutor.leaveChat(
|
||||
suspend fun TelegramBot.leaveChat(
|
||||
chat: PublicChat
|
||||
) = leaveChat(chat.id)
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.chat.get
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.chat.get.GetChat
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.*
|
||||
@ -9,11 +9,11 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.extended.
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.extended.*
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.utils.PreviewFeature
|
||||
|
||||
suspend fun RequestsExecutor.getChat(
|
||||
suspend fun TelegramBot.getChat(
|
||||
chatId: ChatIdentifier
|
||||
) = execute(GetChat(chatId))
|
||||
|
||||
suspend fun RequestsExecutor.getChat(
|
||||
suspend fun TelegramBot.getChat(
|
||||
chat: Chat
|
||||
) = getChat(chat.id)
|
||||
|
||||
@ -24,7 +24,7 @@ suspend fun RequestsExecutor.getChat(
|
||||
* @throws ClassCastException
|
||||
*/
|
||||
@PreviewFeature
|
||||
suspend fun RequestsExecutor.getChat(
|
||||
suspend fun TelegramBot.getChat(
|
||||
chat: PublicChat
|
||||
) = getChat(chat.id) as ExtendedPublicChat
|
||||
|
||||
@ -36,7 +36,7 @@ suspend fun RequestsExecutor.getChat(
|
||||
* @throws ClassCastException
|
||||
*/
|
||||
@PreviewFeature
|
||||
suspend fun RequestsExecutor.getChat(
|
||||
suspend fun TelegramBot.getChat(
|
||||
chat: ChannelChat
|
||||
) = getChat(chat.id) as ExtendedChannelChat
|
||||
|
||||
@ -47,7 +47,7 @@ suspend fun RequestsExecutor.getChat(
|
||||
* @throws ClassCastException
|
||||
*/
|
||||
@PreviewFeature
|
||||
suspend fun RequestsExecutor.getChat(
|
||||
suspend fun TelegramBot.getChat(
|
||||
chat: ChannelChatImpl
|
||||
) = getChat(chat.id) as ExtendedChannelChatImpl
|
||||
|
||||
@ -59,7 +59,7 @@ suspend fun RequestsExecutor.getChat(
|
||||
* @throws ClassCastException
|
||||
*/
|
||||
@PreviewFeature
|
||||
suspend fun RequestsExecutor.getChat(
|
||||
suspend fun TelegramBot.getChat(
|
||||
chat: GroupChat
|
||||
) = getChat(chat.id) as ExtendedGroupChat
|
||||
|
||||
@ -70,7 +70,7 @@ suspend fun RequestsExecutor.getChat(
|
||||
* @throws ClassCastException
|
||||
*/
|
||||
@PreviewFeature
|
||||
suspend fun RequestsExecutor.getChat(
|
||||
suspend fun TelegramBot.getChat(
|
||||
chat: GroupChatImpl
|
||||
) = getChat(chat.id) as ExtendedGroupChatImpl
|
||||
|
||||
@ -82,7 +82,7 @@ suspend fun RequestsExecutor.getChat(
|
||||
* @throws ClassCastException
|
||||
*/
|
||||
@PreviewFeature
|
||||
suspend fun RequestsExecutor.getChat(
|
||||
suspend fun TelegramBot.getChat(
|
||||
chat: SupergroupChat
|
||||
) = getChat(chat.id) as ExtendedSupergroupChat
|
||||
|
||||
@ -93,7 +93,7 @@ suspend fun RequestsExecutor.getChat(
|
||||
* @throws ClassCastException
|
||||
*/
|
||||
@PreviewFeature
|
||||
suspend fun RequestsExecutor.getChat(
|
||||
suspend fun TelegramBot.getChat(
|
||||
chat: SupergroupChatImpl
|
||||
) = getChat(chat.id) as ExtendedSupergroupChatImpl
|
||||
|
||||
@ -105,7 +105,7 @@ suspend fun RequestsExecutor.getChat(
|
||||
* @throws ClassCastException
|
||||
*/
|
||||
@PreviewFeature
|
||||
suspend fun RequestsExecutor.getChat(
|
||||
suspend fun TelegramBot.getChat(
|
||||
chat: PrivateChat
|
||||
) = getChat(chat.id) as ExtendedPrivateChat
|
||||
|
||||
@ -116,7 +116,7 @@ suspend fun RequestsExecutor.getChat(
|
||||
* @throws ClassCastException
|
||||
*/
|
||||
@PreviewFeature
|
||||
suspend fun RequestsExecutor.getChat(
|
||||
suspend fun TelegramBot.getChat(
|
||||
chat: PrivateChatImpl
|
||||
) = getChat(chat.id) as ExtendedPrivateChatImpl
|
||||
|
||||
@ -127,6 +127,6 @@ suspend fun RequestsExecutor.getChat(
|
||||
* @throws ClassCastException
|
||||
*/
|
||||
@PreviewFeature
|
||||
suspend fun RequestsExecutor.getChat(
|
||||
suspend fun TelegramBot.getChat(
|
||||
chat: CommonUser
|
||||
) = getChat(chat.id) as ExtendedUser
|
||||
|
@ -1,14 +1,14 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.chat.get
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.chat.get.GetChatAdministrators
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.PublicChat
|
||||
|
||||
suspend fun RequestsExecutor.getChatAdministrators(
|
||||
suspend fun TelegramBot.getChatAdministrators(
|
||||
chatId: ChatIdentifier
|
||||
) = execute(GetChatAdministrators(chatId))
|
||||
|
||||
suspend fun RequestsExecutor.getChatAdministrators(
|
||||
suspend fun TelegramBot.getChatAdministrators(
|
||||
chat: PublicChat
|
||||
) = getChatAdministrators(chat.id)
|
||||
|
@ -1,14 +1,14 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.chat.get
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.chat.get.GetChatMembersCount
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.PublicChat
|
||||
|
||||
suspend fun RequestsExecutor.getChatMembersCount(
|
||||
suspend fun TelegramBot.getChatMembersCount(
|
||||
chatId: ChatIdentifier
|
||||
) = execute(GetChatMembersCount(chatId))
|
||||
|
||||
suspend fun RequestsExecutor.getChatMembersCount(
|
||||
suspend fun TelegramBot.getChatMembersCount(
|
||||
chat: PublicChat
|
||||
) = getChatMembersCount(chat.id)
|
||||
|
@ -1,26 +1,26 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.chat.members
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
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 RequestsExecutor.getChatMember(
|
||||
suspend fun TelegramBot.getChatMember(
|
||||
chatId: ChatIdentifier,
|
||||
userId: UserId
|
||||
) = execute(GetChatMember(chatId, userId))
|
||||
|
||||
suspend fun RequestsExecutor.getChatMember(
|
||||
suspend fun TelegramBot.getChatMember(
|
||||
chat: PublicChat,
|
||||
userId: UserId
|
||||
) = getChatMember(chat.id, userId)
|
||||
|
||||
suspend fun RequestsExecutor.getChatMember(
|
||||
suspend fun TelegramBot.getChatMember(
|
||||
chatId: ChatId,
|
||||
user: User
|
||||
) = getChatMember(chatId, user.id)
|
||||
|
||||
suspend fun RequestsExecutor.getChatMember(
|
||||
suspend fun TelegramBot.getChatMember(
|
||||
chat: PublicChat,
|
||||
user: User
|
||||
) = getChatMember(chat.id, user.id)
|
||||
|
@ -1,29 +1,29 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.chat.members
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.chat.members.KickChatMember
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.PublicChat
|
||||
|
||||
suspend fun RequestsExecutor.kickChatMember(
|
||||
suspend fun TelegramBot.kickChatMember(
|
||||
chatId: ChatIdentifier,
|
||||
userId: UserId,
|
||||
untilDate: TelegramDate? = null
|
||||
) = execute(KickChatMember(chatId, userId, untilDate))
|
||||
|
||||
suspend fun RequestsExecutor.kickChatMember(
|
||||
suspend fun TelegramBot.kickChatMember(
|
||||
chat: PublicChat,
|
||||
userId: UserId,
|
||||
untilDate: TelegramDate? = null
|
||||
) = kickChatMember(chat.id, userId, untilDate)
|
||||
|
||||
suspend fun RequestsExecutor.kickChatMember(
|
||||
suspend fun TelegramBot.kickChatMember(
|
||||
chatId: ChatId,
|
||||
user: User,
|
||||
untilDate: TelegramDate? = null
|
||||
) = kickChatMember(chatId, user.id, untilDate)
|
||||
|
||||
suspend fun RequestsExecutor.kickChatMember(
|
||||
suspend fun TelegramBot.kickChatMember(
|
||||
chat: PublicChat,
|
||||
user: User,
|
||||
untilDate: TelegramDate? = null
|
||||
|
@ -1,11 +1,11 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.chat.members
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.chat.members.PromoteChatMember
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.PublicChat
|
||||
|
||||
suspend fun RequestsExecutor.promoteChatMember(
|
||||
suspend fun TelegramBot.promoteChatMember(
|
||||
chatId: ChatIdentifier,
|
||||
userId: UserId,
|
||||
untilDate: TelegramDate? = null,
|
||||
@ -33,7 +33,7 @@ suspend fun RequestsExecutor.promoteChatMember(
|
||||
)
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.promoteChatMember(
|
||||
suspend fun TelegramBot.promoteChatMember(
|
||||
chat: PublicChat,
|
||||
userId: UserId,
|
||||
untilDate: TelegramDate? = null,
|
||||
@ -59,7 +59,7 @@ suspend fun RequestsExecutor.promoteChatMember(
|
||||
canPromoteMembers
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.promoteChatMember(
|
||||
suspend fun TelegramBot.promoteChatMember(
|
||||
chatId: ChatId,
|
||||
user: User,
|
||||
untilDate: TelegramDate? = null,
|
||||
@ -85,7 +85,7 @@ suspend fun RequestsExecutor.promoteChatMember(
|
||||
canPromoteMembers
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.promoteChatMember(
|
||||
suspend fun TelegramBot.promoteChatMember(
|
||||
chat: PublicChat,
|
||||
user: User,
|
||||
untilDate: TelegramDate? = null,
|
||||
|
@ -1,33 +1,33 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.chat.members
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.chat.members.RestrictChatMember
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.ChatPermissions
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.PublicChat
|
||||
|
||||
suspend fun RequestsExecutor.restrictChatMember(
|
||||
suspend fun TelegramBot.restrictChatMember(
|
||||
chatId: ChatIdentifier,
|
||||
userId: UserId,
|
||||
untilDate: TelegramDate? = null,
|
||||
permissions: ChatPermissions = ChatPermissions()
|
||||
) = execute(RestrictChatMember(chatId, userId, untilDate, permissions))
|
||||
|
||||
suspend fun RequestsExecutor.restrictChatMember(
|
||||
suspend fun TelegramBot.restrictChatMember(
|
||||
chat: PublicChat,
|
||||
userId: UserId,
|
||||
untilDate: TelegramDate? = null,
|
||||
permissions: ChatPermissions = ChatPermissions()
|
||||
) = restrictChatMember(chat.id, userId, untilDate, permissions)
|
||||
|
||||
suspend fun RequestsExecutor.restrictChatMember(
|
||||
suspend fun TelegramBot.restrictChatMember(
|
||||
chatId: ChatId,
|
||||
user: User,
|
||||
untilDate: TelegramDate? = null,
|
||||
permissions: ChatPermissions = ChatPermissions()
|
||||
) = restrictChatMember(chatId, user.id, untilDate, permissions)
|
||||
|
||||
suspend fun RequestsExecutor.restrictChatMember(
|
||||
suspend fun TelegramBot.restrictChatMember(
|
||||
chat: PublicChat,
|
||||
user: User,
|
||||
untilDate: TelegramDate? = null,
|
||||
|
@ -1,29 +1,29 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.chat.members
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.chat.members.SetChatAdministratorCustomTitle
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.PublicChat
|
||||
|
||||
suspend fun RequestsExecutor.setChatAdministratorCustomTitle(
|
||||
suspend fun TelegramBot.setChatAdministratorCustomTitle(
|
||||
chatId: ChatId,
|
||||
userId: UserId,
|
||||
customTitle: String
|
||||
) = execute(SetChatAdministratorCustomTitle(chatId, userId, customTitle))
|
||||
|
||||
suspend fun RequestsExecutor.setChatAdministratorCustomTitle(
|
||||
suspend fun TelegramBot.setChatAdministratorCustomTitle(
|
||||
chat: PublicChat,
|
||||
userId: UserId,
|
||||
customTitle: String
|
||||
) = setChatAdministratorCustomTitle(chat.id, userId, customTitle)
|
||||
|
||||
suspend fun RequestsExecutor.setChatAdministratorCustomTitle(
|
||||
suspend fun TelegramBot.setChatAdministratorCustomTitle(
|
||||
chatId: ChatId,
|
||||
user: User,
|
||||
customTitle: String
|
||||
) = setChatAdministratorCustomTitle(chatId, user.id, customTitle)
|
||||
|
||||
suspend fun RequestsExecutor.setChatAdministratorCustomTitle(
|
||||
suspend fun TelegramBot.setChatAdministratorCustomTitle(
|
||||
chat: PublicChat,
|
||||
user: User,
|
||||
customTitle: String
|
||||
|
@ -1,26 +1,26 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.chat.members
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.chat.members.UnbanChatMember
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.PublicChat
|
||||
|
||||
suspend fun RequestsExecutor.unbanChatMember(
|
||||
suspend fun TelegramBot.unbanChatMember(
|
||||
chatId: ChatIdentifier,
|
||||
userId: UserId
|
||||
) = execute(UnbanChatMember(chatId, userId))
|
||||
|
||||
suspend fun RequestsExecutor.unbanChatMember(
|
||||
suspend fun TelegramBot.unbanChatMember(
|
||||
chat: PublicChat,
|
||||
userId: UserId
|
||||
) = unbanChatMember(chat.id, userId)
|
||||
|
||||
suspend fun RequestsExecutor.unbanChatMember(
|
||||
suspend fun TelegramBot.unbanChatMember(
|
||||
chatId: ChatId,
|
||||
user: User
|
||||
) = unbanChatMember(chatId, user.id)
|
||||
|
||||
suspend fun RequestsExecutor.unbanChatMember(
|
||||
suspend fun TelegramBot.unbanChatMember(
|
||||
chat: PublicChat,
|
||||
user: User
|
||||
) = unbanChatMember(chat.id, user.id)
|
||||
|
@ -1,14 +1,14 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.chat.modify
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.chat.modify.DeleteChatPhoto
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.PublicChat
|
||||
|
||||
suspend fun RequestsExecutor.deleteChatPhoto(
|
||||
suspend fun TelegramBot.deleteChatPhoto(
|
||||
chatId: ChatIdentifier
|
||||
) = execute(DeleteChatPhoto(chatId))
|
||||
|
||||
suspend fun RequestsExecutor.deleteChatPhoto(
|
||||
suspend fun TelegramBot.deleteChatPhoto(
|
||||
chat: PublicChat
|
||||
) = deleteChatPhoto(chat.id)
|
||||
|
@ -1,25 +1,25 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.chat.modify
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.chat.modify.PinChatMessage
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.MessageIdentifier
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.PublicChat
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.Message
|
||||
|
||||
suspend fun RequestsExecutor.pinChatMessage(
|
||||
suspend fun TelegramBot.pinChatMessage(
|
||||
chatId: ChatIdentifier,
|
||||
messageId: MessageIdentifier,
|
||||
disableNotification: Boolean = false
|
||||
) = execute(PinChatMessage(chatId, messageId, disableNotification))
|
||||
|
||||
suspend fun RequestsExecutor.pinChatMessage(
|
||||
suspend fun TelegramBot.pinChatMessage(
|
||||
chat: PublicChat,
|
||||
messageId: MessageIdentifier,
|
||||
disableNotification: Boolean = false
|
||||
) = pinChatMessage(chat.id, messageId, disableNotification)
|
||||
|
||||
suspend fun RequestsExecutor.pinChatMessage(
|
||||
suspend fun TelegramBot.pinChatMessage(
|
||||
message: Message,
|
||||
disableNotification: Boolean = false
|
||||
) = if (message.chat is PublicChat) {
|
||||
|
@ -1,16 +1,16 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.chat.modify
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.chat.modify.SetChatDescription
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.PublicChat
|
||||
|
||||
suspend fun RequestsExecutor.setChatDescription(
|
||||
suspend fun TelegramBot.setChatDescription(
|
||||
chatId: ChatIdentifier,
|
||||
description: String
|
||||
) = execute(SetChatDescription(chatId, description))
|
||||
|
||||
suspend fun RequestsExecutor.setChatDescription(
|
||||
suspend fun TelegramBot.setChatDescription(
|
||||
chat: PublicChat,
|
||||
description: String
|
||||
) = setChatDescription(chat.id, description)
|
||||
|
@ -1,17 +1,17 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.chat.modify
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.chat.modify.SetChatPermissions
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.ChatPermissions
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.PublicChat
|
||||
|
||||
suspend fun RequestsExecutor.setDefaultChatMembersPermissions(
|
||||
suspend fun TelegramBot.setDefaultChatMembersPermissions(
|
||||
chatId: ChatIdentifier,
|
||||
permissions: ChatPermissions
|
||||
) = execute(SetChatPermissions(chatId, permissions))
|
||||
|
||||
suspend fun RequestsExecutor.setDefaultChatMembersPermissions(
|
||||
suspend fun TelegramBot.setDefaultChatMembersPermissions(
|
||||
chat: PublicChat,
|
||||
permissions: ChatPermissions
|
||||
) = setDefaultChatMembersPermissions(chat.id, permissions)
|
||||
|
@ -1,17 +1,17 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.chat.modify
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.MultipartFile
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.chat.modify.SetChatPhoto
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.PublicChat
|
||||
|
||||
suspend fun RequestsExecutor.setChatPhoto(
|
||||
suspend fun TelegramBot.setChatPhoto(
|
||||
chatId: ChatIdentifier,
|
||||
photo: MultipartFile
|
||||
) = execute(SetChatPhoto(chatId, photo))
|
||||
|
||||
suspend fun RequestsExecutor.setChatPhoto(
|
||||
suspend fun TelegramBot.setChatPhoto(
|
||||
chat: PublicChat,
|
||||
photo: MultipartFile
|
||||
) = setChatPhoto(chat.id, photo)
|
||||
|
@ -1,16 +1,16 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.chat.modify
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.chat.modify.SetChatTitle
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.PublicChat
|
||||
|
||||
suspend fun RequestsExecutor.setChatTitle(
|
||||
suspend fun TelegramBot.setChatTitle(
|
||||
chatId: ChatIdentifier,
|
||||
title: String
|
||||
) = execute(SetChatTitle(chatId, title))
|
||||
|
||||
suspend fun RequestsExecutor.setChatTitle(
|
||||
suspend fun TelegramBot.setChatTitle(
|
||||
chat: PublicChat,
|
||||
title: String
|
||||
) = setChatTitle(chat.id, title)
|
||||
|
@ -1,14 +1,14 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.chat.modify
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.chat.modify.UnpinChatMessage
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.PublicChat
|
||||
|
||||
suspend fun RequestsExecutor.unpinChatMessage(
|
||||
suspend fun TelegramBot.unpinChatMessage(
|
||||
chatId: ChatIdentifier
|
||||
) = execute(UnpinChatMessage(chatId))
|
||||
|
||||
suspend fun RequestsExecutor.unpinChatMessage(
|
||||
suspend fun TelegramBot.unpinChatMessage(
|
||||
chat: PublicChat
|
||||
) = unpinChatMessage(chat.id)
|
||||
|
@ -1,14 +1,14 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.chat.stickers
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.chat.stickers.DeleteChatStickerSet
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.SupergroupChat
|
||||
|
||||
suspend fun RequestsExecutor.deleteChatStickerSet(
|
||||
suspend fun TelegramBot.deleteChatStickerSet(
|
||||
chatId: ChatIdentifier
|
||||
) = execute(DeleteChatStickerSet(chatId))
|
||||
|
||||
suspend fun RequestsExecutor.deleteChatStickerSet(
|
||||
suspend fun TelegramBot.deleteChatStickerSet(
|
||||
chat: SupergroupChat
|
||||
) = deleteChatStickerSet(chat.id)
|
||||
|
@ -1,17 +1,17 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.chat.stickers
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.chat.stickers.SetChatStickerSet
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.StickerSetName
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.SupergroupChat
|
||||
|
||||
suspend fun RequestsExecutor.setChatStickerSet(
|
||||
suspend fun TelegramBot.setChatStickerSet(
|
||||
chatId: ChatIdentifier,
|
||||
stickerSetName: StickerSetName
|
||||
) = execute(SetChatStickerSet(chatId, stickerSetName))
|
||||
|
||||
suspend fun RequestsExecutor.setChatStickerSet(
|
||||
suspend fun TelegramBot.setChatStickerSet(
|
||||
chat: SupergroupChat,
|
||||
stickerSetName: StickerSetName
|
||||
) = setChatStickerSet(chat.id, stickerSetName)
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.edit.LiveLocation
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.edit.LiveLocation.EditChatMessageLiveLocation
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
|
||||
@ -8,7 +8,7 @@ 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.LocationContent
|
||||
|
||||
suspend fun RequestsExecutor.editLiveLocation(
|
||||
suspend fun TelegramBot.editLiveLocation(
|
||||
chatId: ChatIdentifier,
|
||||
messageId: MessageIdentifier,
|
||||
latitude: Double,
|
||||
@ -20,7 +20,7 @@ suspend fun RequestsExecutor.editLiveLocation(
|
||||
)
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.editLiveLocation(
|
||||
suspend fun TelegramBot.editLiveLocation(
|
||||
chat: Chat,
|
||||
messageId: MessageIdentifier,
|
||||
latitude: Double,
|
||||
@ -28,14 +28,14 @@ suspend fun RequestsExecutor.editLiveLocation(
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = editLiveLocation(chat.id, messageId, latitude, longitude, replyMarkup)
|
||||
|
||||
suspend fun RequestsExecutor.editLiveLocation(
|
||||
suspend fun TelegramBot.editLiveLocation(
|
||||
message: ContentMessage<LocationContent>,
|
||||
latitude: Double,
|
||||
longitude: Double,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = editLiveLocation(message.chat, message.messageId, latitude, longitude, replyMarkup)
|
||||
|
||||
suspend fun RequestsExecutor.editLiveLocation(
|
||||
suspend fun TelegramBot.editLiveLocation(
|
||||
chatId: ChatIdentifier,
|
||||
messageId: MessageIdentifier,
|
||||
location: Location,
|
||||
@ -46,14 +46,14 @@ suspend fun RequestsExecutor.editLiveLocation(
|
||||
)
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.editLiveLocation(
|
||||
suspend fun TelegramBot.editLiveLocation(
|
||||
chat: Chat,
|
||||
messageId: MessageIdentifier,
|
||||
location: Location,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = editLiveLocation(chat.id, messageId, location.latitude, location.longitude, replyMarkup)
|
||||
|
||||
suspend fun RequestsExecutor.editLiveLocation(
|
||||
suspend fun TelegramBot.editLiveLocation(
|
||||
message: ContentMessage<LocationContent>,
|
||||
location: Location,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
|
@ -1,12 +1,12 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.edit.LiveLocation
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.edit.LiveLocation.EditInlineMessageLiveLocation
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineMessageIdentifier
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.Location
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
|
||||
|
||||
suspend fun RequestsExecutor.editLiveLocation(
|
||||
suspend fun TelegramBot.editLiveLocation(
|
||||
inlineMessageId: InlineMessageIdentifier,
|
||||
latitude: Double,
|
||||
longitude: Double,
|
||||
@ -16,7 +16,7 @@ suspend fun RequestsExecutor.editLiveLocation(
|
||||
inlineMessageId, latitude, longitude, replyMarkup
|
||||
)
|
||||
)
|
||||
suspend fun RequestsExecutor.editLiveLocation(
|
||||
suspend fun TelegramBot.editLiveLocation(
|
||||
inlineMessageId: InlineMessageIdentifier,
|
||||
location: Location,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.edit.LiveLocation
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.edit.LiveLocation.StopChatMessageLiveLocation
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.MessageIdentifier
|
||||
@ -9,7 +9,7 @@ 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.LocationContent
|
||||
|
||||
suspend fun RequestsExecutor.stopLiveLocation(
|
||||
suspend fun TelegramBot.stopLiveLocation(
|
||||
chatId: ChatIdentifier,
|
||||
messageId: MessageIdentifier,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
@ -19,13 +19,13 @@ suspend fun RequestsExecutor.stopLiveLocation(
|
||||
)
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.stopLiveLocation(
|
||||
suspend fun TelegramBot.stopLiveLocation(
|
||||
chat: Chat,
|
||||
messageId: MessageIdentifier,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = stopLiveLocation(chat.id, messageId, replyMarkup)
|
||||
|
||||
suspend fun RequestsExecutor.stopLiveLocation(
|
||||
suspend fun TelegramBot.stopLiveLocation(
|
||||
message: ContentMessage<LocationContent>,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = stopLiveLocation(message.chat, message.messageId, replyMarkup)
|
||||
|
@ -1,11 +1,11 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.edit.LiveLocation
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.edit.LiveLocation.StopInlineMessageLiveLocation
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineMessageIdentifier
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
|
||||
|
||||
suspend fun RequestsExecutor.stopLiveLocation(
|
||||
suspend fun TelegramBot.stopLiveLocation(
|
||||
inlineMessageId: InlineMessageIdentifier,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = execute(
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.edit.ReplyMarkup
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.edit.ReplyMarkup.EditChatMessageReplyMarkup
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.MessageIdentifier
|
||||
@ -8,7 +8,7 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMa
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.Chat
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.Message
|
||||
|
||||
suspend fun RequestsExecutor.editMessageReplyMarkup(
|
||||
suspend fun TelegramBot.editMessageReplyMarkup(
|
||||
chatId: ChatIdentifier,
|
||||
messageId: MessageIdentifier,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
@ -16,13 +16,13 @@ suspend fun RequestsExecutor.editMessageReplyMarkup(
|
||||
EditChatMessageReplyMarkup(chatId, messageId, replyMarkup)
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.editMessageReplyMarkup(
|
||||
suspend fun TelegramBot.editMessageReplyMarkup(
|
||||
chat: Chat,
|
||||
messageId: MessageIdentifier,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = editMessageReplyMarkup(chat.id, messageId, replyMarkup)
|
||||
|
||||
suspend fun RequestsExecutor.editMessageReplyMarkup(
|
||||
suspend fun TelegramBot.editMessageReplyMarkup(
|
||||
message: Message,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = editMessageReplyMarkup(message.chat.id, message.messageId, replyMarkup)
|
||||
|
@ -1,11 +1,11 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.edit.ReplyMarkup
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.edit.ReplyMarkup.EditInlineMessageReplyMarkup
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineMessageIdentifier
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
|
||||
|
||||
suspend fun RequestsExecutor.editMessageReplyMarkup(
|
||||
suspend fun TelegramBot.editMessageReplyMarkup(
|
||||
inlineMessageId: InlineMessageIdentifier,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = execute(EditInlineMessageReplyMarkup(inlineMessageId, replyMarkup))
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.edit.caption
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.CaptionedInput
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.edit.caption.EditChatMessageCaption
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.MessageIdentifier
|
||||
@ -11,7 +11,7 @@ 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.abstracts.MediaContent
|
||||
|
||||
suspend fun RequestsExecutor.editMessageCaption(
|
||||
suspend fun TelegramBot.editMessageCaption(
|
||||
chatId: ChatIdentifier,
|
||||
messageId: MessageIdentifier,
|
||||
text: String,
|
||||
@ -21,7 +21,7 @@ suspend fun RequestsExecutor.editMessageCaption(
|
||||
EditChatMessageCaption(chatId, messageId, text, parseMode, replyMarkup)
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.editMessageCaption(
|
||||
suspend fun TelegramBot.editMessageCaption(
|
||||
chat: Chat,
|
||||
messageId: MessageIdentifier,
|
||||
text: String,
|
||||
@ -29,7 +29,7 @@ suspend fun RequestsExecutor.editMessageCaption(
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = editMessageCaption(chat.id, messageId, text, parseMode, replyMarkup)
|
||||
|
||||
suspend fun <T> RequestsExecutor.editMessageCaption(
|
||||
suspend fun <T> TelegramBot.editMessageCaption(
|
||||
message: ContentMessage<T>,
|
||||
text: String,
|
||||
parseMode: ParseMode? = null,
|
||||
|
@ -1,12 +1,12 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.edit.caption
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.edit.caption.EditInlineMessageCaption
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineMessageIdentifier
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
|
||||
|
||||
suspend fun RequestsExecutor.editMessageCaption(
|
||||
suspend fun TelegramBot.editMessageCaption(
|
||||
inlineMessageId: InlineMessageIdentifier,
|
||||
text: String,
|
||||
parseMode: ParseMode? = null,
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.edit.media
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.edit.media.EditChatMessageMedia
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.InputMedia.InputMedia
|
||||
@ -10,7 +10,7 @@ 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.abstracts.MediaContent
|
||||
|
||||
suspend fun RequestsExecutor.editMessageMedia(
|
||||
suspend fun TelegramBot.editMessageMedia(
|
||||
chatId: ChatIdentifier,
|
||||
messageId: MessageIdentifier,
|
||||
media: InputMedia,
|
||||
@ -19,14 +19,14 @@ suspend fun RequestsExecutor.editMessageMedia(
|
||||
EditChatMessageMedia(chatId, messageId, media, replyMarkup)
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.editMessageMedia(
|
||||
suspend fun TelegramBot.editMessageMedia(
|
||||
chat: Chat,
|
||||
messageId: MessageIdentifier,
|
||||
media: InputMedia,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = editMessageMedia(chat.id, messageId, media, replyMarkup)
|
||||
|
||||
suspend fun RequestsExecutor.editMessageMedia(
|
||||
suspend fun TelegramBot.editMessageMedia(
|
||||
message: ContentMessage<out MediaContent>,
|
||||
media: InputMedia,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
|
@ -1,12 +1,12 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.edit.media
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.edit.media.EditInlineMessageMedia
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineMessageIdentifier
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.InputMedia.InputMedia
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
|
||||
|
||||
suspend fun RequestsExecutor.editMessageCaption(
|
||||
suspend fun TelegramBot.editMessageCaption(
|
||||
inlineMessageId: InlineMessageIdentifier,
|
||||
media: InputMedia,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.edit.text
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.edit.text.EditChatMessageText
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.MessageIdentifier
|
||||
@ -10,7 +10,7 @@ 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.TextContent
|
||||
|
||||
suspend fun RequestsExecutor.editMessageText(
|
||||
suspend fun TelegramBot.editMessageText(
|
||||
chatId: ChatIdentifier,
|
||||
messageId: MessageIdentifier,
|
||||
text: String,
|
||||
@ -21,7 +21,7 @@ suspend fun RequestsExecutor.editMessageText(
|
||||
EditChatMessageText(chatId, messageId, text, parseMode, disableWebPagePreview, replyMarkup)
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.editMessageText(
|
||||
suspend fun TelegramBot.editMessageText(
|
||||
chat: Chat,
|
||||
messageId: MessageIdentifier,
|
||||
text: String,
|
||||
@ -30,7 +30,7 @@ suspend fun RequestsExecutor.editMessageText(
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = editMessageText(chat.id, messageId, text, parseMode, disableWebPagePreview, replyMarkup)
|
||||
|
||||
suspend fun RequestsExecutor.editMessageText(
|
||||
suspend fun TelegramBot.editMessageText(
|
||||
message: ContentMessage<TextContent>,
|
||||
text: String,
|
||||
parseMode: ParseMode? = null,
|
||||
|
@ -1,12 +1,12 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.edit.text
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.edit.text.EditInlineMessageText
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineMessageIdentifier
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
|
||||
|
||||
suspend fun RequestsExecutor.editMessageText(
|
||||
suspend fun TelegramBot.editMessageText(
|
||||
inlineMessageId: InlineMessageIdentifier,
|
||||
text: String,
|
||||
parseMode: ParseMode? = null,
|
||||
|
@ -1,13 +1,13 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.games
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
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 RequestsExecutor.getGameScore(
|
||||
suspend fun TelegramBot.getGameScore(
|
||||
userId: UserId,
|
||||
chatId: ChatId,
|
||||
messageId: MessageIdentifier
|
||||
@ -15,7 +15,7 @@ suspend fun RequestsExecutor.getGameScore(
|
||||
GetGameHighScoresByChat(userId, chatId, messageId)
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.getGameScore(
|
||||
suspend fun TelegramBot.getGameScore(
|
||||
user: CommonUser,
|
||||
chatId: ChatId,
|
||||
messageId: MessageIdentifier
|
||||
@ -23,7 +23,7 @@ suspend fun RequestsExecutor.getGameScore(
|
||||
user.id, chatId, messageId
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.getGameScore(
|
||||
suspend fun TelegramBot.getGameScore(
|
||||
userId: UserId,
|
||||
chat: Chat,
|
||||
messageId: MessageIdentifier
|
||||
@ -31,7 +31,7 @@ suspend fun RequestsExecutor.getGameScore(
|
||||
userId, chat.id, messageId
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.getGameScore(
|
||||
suspend fun TelegramBot.getGameScore(
|
||||
user: CommonUser,
|
||||
chat: Chat,
|
||||
messageId: MessageIdentifier
|
||||
@ -39,14 +39,14 @@ suspend fun RequestsExecutor.getGameScore(
|
||||
user.id, chat.id, messageId
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.getGameScore(
|
||||
suspend fun TelegramBot.getGameScore(
|
||||
userId: UserId,
|
||||
message: ContentMessage<GameContent>
|
||||
) = getGameScore(
|
||||
userId, message.chat.id, message.messageId
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.getGameScore(
|
||||
suspend fun TelegramBot.getGameScore(
|
||||
user: CommonUser,
|
||||
message: ContentMessage<GameContent>
|
||||
) = getGameScore(
|
||||
|
@ -1,10 +1,10 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.games
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.games.GetGameHighScoresByInlineMessageId
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
||||
|
||||
suspend fun RequestsExecutor.getGameScore(
|
||||
suspend fun TelegramBot.getGameScore(
|
||||
userId: UserId,
|
||||
inlineMessageId: InlineMessageIdentifier
|
||||
) = execute(
|
||||
@ -13,7 +13,7 @@ suspend fun RequestsExecutor.getGameScore(
|
||||
)
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.getGameScore(
|
||||
suspend fun TelegramBot.getGameScore(
|
||||
user: CommonUser,
|
||||
inlineMessageId: InlineMessageIdentifier
|
||||
) = getGameScore(user.id, inlineMessageId)
|
||||
|
@ -1,13 +1,13 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.games
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.games.SetGameScoreByChatId
|
||||
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 RequestsExecutor.setGameScore(
|
||||
suspend fun TelegramBot.setGameScore(
|
||||
userId: UserId,
|
||||
score: Long,
|
||||
chatId: ChatId,
|
||||
@ -18,7 +18,7 @@ suspend fun RequestsExecutor.setGameScore(
|
||||
SetGameScoreByChatId(userId, score, chatId, messageId, force, disableEditMessage)
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.setGameScore(
|
||||
suspend fun TelegramBot.setGameScore(
|
||||
user: CommonUser,
|
||||
score: Long,
|
||||
chatId: ChatId,
|
||||
@ -29,7 +29,7 @@ suspend fun RequestsExecutor.setGameScore(
|
||||
user.id, score, chatId, messageId, force, disableEditMessage
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.setGameScore(
|
||||
suspend fun TelegramBot.setGameScore(
|
||||
userId: UserId,
|
||||
score: Long,
|
||||
chat: Chat,
|
||||
@ -40,7 +40,7 @@ suspend fun RequestsExecutor.setGameScore(
|
||||
userId, score, chat.id, messageId, force, disableEditMessage
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.setGameScore(
|
||||
suspend fun TelegramBot.setGameScore(
|
||||
user: CommonUser,
|
||||
score: Long,
|
||||
chat: Chat,
|
||||
@ -51,7 +51,7 @@ suspend fun RequestsExecutor.setGameScore(
|
||||
user.id, score, chat.id, messageId, force, disableEditMessage
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.setGameScore(
|
||||
suspend fun TelegramBot.setGameScore(
|
||||
userId: UserId,
|
||||
score: Long,
|
||||
message: ContentMessage<GameContent>,
|
||||
@ -61,7 +61,7 @@ suspend fun RequestsExecutor.setGameScore(
|
||||
userId, score, message.chat.id, message.messageId, force, disableEditMessage
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.setGameScore(
|
||||
suspend fun TelegramBot.setGameScore(
|
||||
user: CommonUser,
|
||||
score: Long,
|
||||
message: ContentMessage<GameContent>,
|
||||
|
@ -1,10 +1,10 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.games
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.games.SetGameScoreByInlineMessageId
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
||||
|
||||
suspend fun RequestsExecutor.setGameScore(
|
||||
suspend fun TelegramBot.setGameScore(
|
||||
userId: UserId,
|
||||
score: Long,
|
||||
inlineMessageId: InlineMessageIdentifier,
|
||||
@ -16,7 +16,7 @@ suspend fun RequestsExecutor.setGameScore(
|
||||
)
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.setGameScore(
|
||||
suspend fun TelegramBot.setGameScore(
|
||||
user: CommonUser,
|
||||
score: Long,
|
||||
inlineMessageId: InlineMessageIdentifier,
|
||||
|
@ -1,16 +1,16 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.get
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.FileId
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.get.GetFile
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.files.abstracts.TelegramMediaFile
|
||||
|
||||
suspend fun RequestsExecutor.getFileAdditionalInfo(
|
||||
suspend fun TelegramBot.getFileAdditionalInfo(
|
||||
fileId: FileId
|
||||
) = execute(
|
||||
GetFile(fileId)
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.getFileAdditionalInfo(
|
||||
suspend fun TelegramBot.getFileAdditionalInfo(
|
||||
file: TelegramMediaFile
|
||||
) = getFileAdditionalInfo(file.fileId)
|
||||
|
@ -1,16 +1,16 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.get
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.get.GetStickerSet
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.files.Sticker
|
||||
|
||||
suspend fun RequestsExecutor.getStickerSet(
|
||||
suspend fun TelegramBot.getStickerSet(
|
||||
name: String
|
||||
) = execute(
|
||||
GetStickerSet(name)
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.getStickerSet(
|
||||
suspend fun TelegramBot.getStickerSet(
|
||||
sticker: Sticker
|
||||
) = getStickerSet(
|
||||
sticker.stickerSetName ?: error("Sticker must contains stickerSetName to be correctly used in getStickerSet method")
|
||||
|
@ -1,11 +1,11 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.get
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.get.GetUserProfilePhotos
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.CommonUser
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.UserId
|
||||
|
||||
suspend fun RequestsExecutor.getUserProfilePhotos(
|
||||
suspend fun TelegramBot.getUserProfilePhotos(
|
||||
userId: UserId,
|
||||
offset: Int? = null,
|
||||
limit: Int? = null
|
||||
@ -15,7 +15,7 @@ suspend fun RequestsExecutor.getUserProfilePhotos(
|
||||
)
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.getUserProfilePhotos(
|
||||
suspend fun TelegramBot.getUserProfilePhotos(
|
||||
user: CommonUser,
|
||||
offset: Int? = null,
|
||||
limit: Int? = null
|
||||
|
@ -1,102 +1,102 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.send
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.SendAction
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.actions.*
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.Chat
|
||||
|
||||
suspend fun RequestsExecutor.sendBotAction(
|
||||
suspend fun TelegramBot.sendBotAction(
|
||||
chatId: ChatIdentifier,
|
||||
action: BotAction
|
||||
) = execute(
|
||||
SendAction(chatId, action)
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.sendBotAction(
|
||||
suspend fun TelegramBot.sendBotAction(
|
||||
chat: Chat,
|
||||
action: BotAction
|
||||
) = sendBotAction(chat.id, action)
|
||||
|
||||
|
||||
suspend fun RequestsExecutor.sendActionTyping(
|
||||
suspend fun TelegramBot.sendActionTyping(
|
||||
chatId: ChatIdentifier
|
||||
) = sendBotAction(chatId, TypingAction)
|
||||
|
||||
suspend fun RequestsExecutor.sendActionUploadPhoto(
|
||||
suspend fun TelegramBot.sendActionUploadPhoto(
|
||||
chatId: ChatIdentifier
|
||||
) = sendBotAction(chatId, UploadPhotoAction)
|
||||
|
||||
suspend fun RequestsExecutor.sendActionRecordVideo(
|
||||
suspend fun TelegramBot.sendActionRecordVideo(
|
||||
chatId: ChatIdentifier
|
||||
) = sendBotAction(chatId, RecordVideoAction)
|
||||
|
||||
suspend fun RequestsExecutor.sendActionUploadVideo(
|
||||
suspend fun TelegramBot.sendActionUploadVideo(
|
||||
chatId: ChatIdentifier
|
||||
) = sendBotAction(chatId, UploadVideoAction)
|
||||
|
||||
suspend fun RequestsExecutor.sendActionRecordAudio(
|
||||
suspend fun TelegramBot.sendActionRecordAudio(
|
||||
chatId: ChatIdentifier
|
||||
) = sendBotAction(chatId, RecordAudioAction)
|
||||
|
||||
suspend fun RequestsExecutor.sendActionUploadAudio(
|
||||
suspend fun TelegramBot.sendActionUploadAudio(
|
||||
chatId: ChatIdentifier
|
||||
) = sendBotAction(chatId, UploadAudioAction)
|
||||
|
||||
suspend fun RequestsExecutor.sendActionUploadDocument(
|
||||
suspend fun TelegramBot.sendActionUploadDocument(
|
||||
chatId: ChatIdentifier
|
||||
) = sendBotAction(chatId, UploadDocumentAction)
|
||||
|
||||
suspend fun RequestsExecutor.sendActionFindLocation(
|
||||
suspend fun TelegramBot.sendActionFindLocation(
|
||||
chatId: ChatIdentifier
|
||||
) = sendBotAction(chatId, FindLocationAction)
|
||||
|
||||
suspend fun RequestsExecutor.sendActionRecordVideoNote(
|
||||
suspend fun TelegramBot.sendActionRecordVideoNote(
|
||||
chatId: ChatIdentifier
|
||||
) = sendBotAction(chatId, RecordVideoNoteAction)
|
||||
|
||||
suspend fun RequestsExecutor.sendActionUploadVideoNote(
|
||||
suspend fun TelegramBot.sendActionUploadVideoNote(
|
||||
chatId: ChatIdentifier
|
||||
) = sendBotAction(chatId, UploadVideoNoteAction)
|
||||
|
||||
|
||||
suspend fun RequestsExecutor.sendActionTyping(
|
||||
suspend fun TelegramBot.sendActionTyping(
|
||||
chat: Chat
|
||||
) = sendBotAction(chat, TypingAction)
|
||||
|
||||
suspend fun RequestsExecutor.sendActionUploadPhoto(
|
||||
suspend fun TelegramBot.sendActionUploadPhoto(
|
||||
chat: Chat
|
||||
) = sendBotAction(chat, UploadPhotoAction)
|
||||
|
||||
suspend fun RequestsExecutor.sendActionRecordVideo(
|
||||
suspend fun TelegramBot.sendActionRecordVideo(
|
||||
chat: Chat
|
||||
) = sendBotAction(chat, RecordVideoAction)
|
||||
|
||||
suspend fun RequestsExecutor.sendActionUploadVideo(
|
||||
suspend fun TelegramBot.sendActionUploadVideo(
|
||||
chat: Chat
|
||||
) = sendBotAction(chat, UploadVideoAction)
|
||||
|
||||
suspend fun RequestsExecutor.sendActionRecordAudio(
|
||||
suspend fun TelegramBot.sendActionRecordAudio(
|
||||
chat: Chat
|
||||
) = sendBotAction(chat, RecordAudioAction)
|
||||
|
||||
suspend fun RequestsExecutor.sendActionUploadAudio(
|
||||
suspend fun TelegramBot.sendActionUploadAudio(
|
||||
chat: Chat
|
||||
) = sendBotAction(chat, UploadAudioAction)
|
||||
|
||||
suspend fun RequestsExecutor.sendActionUploadDocument(
|
||||
suspend fun TelegramBot.sendActionUploadDocument(
|
||||
chat: Chat
|
||||
) = sendBotAction(chat, UploadDocumentAction)
|
||||
|
||||
suspend fun RequestsExecutor.sendActionFindLocation(
|
||||
suspend fun TelegramBot.sendActionFindLocation(
|
||||
chat: Chat
|
||||
) = sendBotAction(chat, FindLocationAction)
|
||||
|
||||
suspend fun RequestsExecutor.sendActionRecordVideoNote(
|
||||
suspend fun TelegramBot.sendActionRecordVideoNote(
|
||||
chat: Chat
|
||||
) = sendBotAction(chat, RecordVideoNoteAction)
|
||||
|
||||
suspend fun RequestsExecutor.sendActionUploadVideoNote(
|
||||
suspend fun TelegramBot.sendActionUploadVideoNote(
|
||||
chat: Chat
|
||||
) = sendBotAction(chat, UploadVideoNoteAction)
|
||||
|
||||
|
@ -1,12 +1,12 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.send
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.SendContact
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.KeyboardMarkup
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.Chat
|
||||
|
||||
suspend fun RequestsExecutor.sendContact(
|
||||
suspend fun TelegramBot.sendContact(
|
||||
chatId: ChatIdentifier,
|
||||
phoneNumber: String,
|
||||
firstName: String,
|
||||
@ -20,7 +20,7 @@ suspend fun RequestsExecutor.sendContact(
|
||||
)
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.sendContact(
|
||||
suspend fun TelegramBot.sendContact(
|
||||
chatId: ChatIdentifier,
|
||||
contact: Contact,
|
||||
disableNotification: Boolean = false,
|
||||
@ -32,7 +32,7 @@ suspend fun RequestsExecutor.sendContact(
|
||||
)
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.sendContact(
|
||||
suspend fun TelegramBot.sendContact(
|
||||
chat: Chat,
|
||||
phoneNumber: String,
|
||||
firstName: String,
|
||||
@ -44,7 +44,7 @@ suspend fun RequestsExecutor.sendContact(
|
||||
chat.id, phoneNumber, firstName, lastName, disableNotification, replyToMessageId, replyMarkup
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.sendContact(
|
||||
suspend fun TelegramBot.sendContact(
|
||||
chat: Chat,
|
||||
contact: Contact,
|
||||
disableNotification: Boolean = false,
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.send
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.SendDice
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.MessageIdentifier
|
||||
@ -8,7 +8,7 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.KeyboardMarkup
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.Chat
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.dice.DiceAnimationType
|
||||
|
||||
suspend fun RequestsExecutor.sendDice(
|
||||
suspend fun TelegramBot.sendDice(
|
||||
chatId: ChatIdentifier,
|
||||
animationType: DiceAnimationType? = null,
|
||||
disableNotification: Boolean = false,
|
||||
@ -18,7 +18,7 @@ suspend fun RequestsExecutor.sendDice(
|
||||
SendDice(chatId, animationType, disableNotification, replyToMessageId, replyMarkup)
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.sendDice(
|
||||
suspend fun TelegramBot.sendDice(
|
||||
chat: Chat,
|
||||
animationType: DiceAnimationType? = null,
|
||||
disableNotification: Boolean = false,
|
||||
|
@ -1,12 +1,12 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.send
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.SendLocation
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.KeyboardMarkup
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.Chat
|
||||
|
||||
suspend fun RequestsExecutor.sendLocation(
|
||||
suspend fun TelegramBot.sendLocation(
|
||||
chatId: ChatIdentifier,
|
||||
latitude: Double,
|
||||
longitude: Double,
|
||||
@ -24,7 +24,7 @@ suspend fun RequestsExecutor.sendLocation(
|
||||
)
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.sendLocation(
|
||||
suspend fun TelegramBot.sendLocation(
|
||||
chatId: ChatIdentifier,
|
||||
location: Location,
|
||||
disableNotification: Boolean = false,
|
||||
@ -39,7 +39,7 @@ suspend fun RequestsExecutor.sendLocation(
|
||||
replyMarkup
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.sendLocation(
|
||||
suspend fun TelegramBot.sendLocation(
|
||||
chat: Chat,
|
||||
latitude: Double,
|
||||
longitude: Double,
|
||||
@ -55,7 +55,7 @@ suspend fun RequestsExecutor.sendLocation(
|
||||
replyMarkup
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.sendLocation(
|
||||
suspend fun TelegramBot.sendLocation(
|
||||
chat: Chat,
|
||||
location: Location,
|
||||
disableNotification: Boolean = false,
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.send
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.SendTextMessage
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.MessageIdentifier
|
||||
@ -8,7 +8,7 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.KeyboardMarkup
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.Chat
|
||||
|
||||
suspend fun RequestsExecutor.sendMessage(
|
||||
suspend fun TelegramBot.sendMessage(
|
||||
chatId: ChatIdentifier,
|
||||
text: String,
|
||||
parseMode: ParseMode? = null,
|
||||
@ -20,7 +20,7 @@ suspend fun RequestsExecutor.sendMessage(
|
||||
SendTextMessage(chatId, text, parseMode, disableWebPagePreview, disableNotification, replyToMessageId, replyMarkup)
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.sendTextMessage(
|
||||
suspend fun TelegramBot.sendTextMessage(
|
||||
chatId: ChatIdentifier,
|
||||
text: String,
|
||||
parseMode: ParseMode? = null,
|
||||
@ -32,7 +32,7 @@ suspend fun RequestsExecutor.sendTextMessage(
|
||||
chatId, text, parseMode, disableWebPagePreview, disableNotification, replyToMessageId, replyMarkup
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.sendMessage(
|
||||
suspend fun TelegramBot.sendMessage(
|
||||
chat: Chat,
|
||||
text: String,
|
||||
parseMode: ParseMode? = null,
|
||||
@ -43,7 +43,7 @@ suspend fun RequestsExecutor.sendMessage(
|
||||
) = sendMessage(chat.id, text, parseMode, disableWebPagePreview, disableNotification, replyToMessageId, replyMarkup)
|
||||
|
||||
|
||||
suspend fun RequestsExecutor.sendTextMessage(
|
||||
suspend fun TelegramBot.sendTextMessage(
|
||||
chat: Chat,
|
||||
text: String,
|
||||
parseMode: ParseMode? = null,
|
||||
|
@ -1,13 +1,13 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.send
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.SendVenue
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.KeyboardMarkup
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.Chat
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.venue.Venue
|
||||
|
||||
suspend fun RequestsExecutor.sendVenue(
|
||||
suspend fun TelegramBot.sendVenue(
|
||||
chatId: ChatIdentifier,
|
||||
latitude: Double,
|
||||
longitude: Double,
|
||||
@ -23,7 +23,7 @@ suspend fun RequestsExecutor.sendVenue(
|
||||
)
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.sendVenue(
|
||||
suspend fun TelegramBot.sendVenue(
|
||||
chat: Chat,
|
||||
latitude: Double,
|
||||
longitude: Double,
|
||||
@ -37,7 +37,7 @@ suspend fun RequestsExecutor.sendVenue(
|
||||
chat.id, latitude, longitude, title, address, foursquareId, disableNotification, replyToMessageId, replyMarkup
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.sendVenue(
|
||||
suspend fun TelegramBot.sendVenue(
|
||||
chatId: ChatIdentifier,
|
||||
location: Location,
|
||||
title: String,
|
||||
@ -50,7 +50,7 @@ suspend fun RequestsExecutor.sendVenue(
|
||||
chatId, location.latitude, location.longitude, title, address, foursquareId, disableNotification, replyToMessageId, replyMarkup
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.sendVenue(
|
||||
suspend fun TelegramBot.sendVenue(
|
||||
chat: Chat,
|
||||
location: Location,
|
||||
title: String,
|
||||
@ -63,7 +63,7 @@ suspend fun RequestsExecutor.sendVenue(
|
||||
chat.id, location.latitude, location.longitude, title, address, foursquareId, disableNotification, replyToMessageId, replyMarkup
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.sendVenue(
|
||||
suspend fun TelegramBot.sendVenue(
|
||||
chatId: ChatIdentifier,
|
||||
venue: Venue,
|
||||
disableNotification: Boolean = false,
|
||||
@ -75,7 +75,7 @@ suspend fun RequestsExecutor.sendVenue(
|
||||
)
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.sendVenue(
|
||||
suspend fun TelegramBot.sendVenue(
|
||||
chat: Chat,
|
||||
venue: Venue,
|
||||
disableNotification: Boolean = false,
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.send.games
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.games.SendGame
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.MessageIdentifier
|
||||
@ -8,7 +8,7 @@ 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
|
||||
|
||||
suspend fun RequestsExecutor.sendGame(
|
||||
suspend fun TelegramBot.sendGame(
|
||||
chatId: ChatIdentifier,
|
||||
gameShortName: String,
|
||||
disableNotification: Boolean = false,
|
||||
@ -20,7 +20,7 @@ suspend fun RequestsExecutor.sendGame(
|
||||
)
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.sendGame(
|
||||
suspend fun TelegramBot.sendGame(
|
||||
chat: Chat,
|
||||
gameShortName: String,
|
||||
disableNotification: Boolean = false,
|
||||
@ -30,7 +30,7 @@ suspend fun RequestsExecutor.sendGame(
|
||||
chat.id, gameShortName, disableNotification, replyToMessageId, replyMarkup
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.sendGame(
|
||||
suspend fun TelegramBot.sendGame(
|
||||
chatId: ChatIdentifier,
|
||||
game: Game,
|
||||
disableNotification: Boolean = false,
|
||||
@ -40,7 +40,7 @@ suspend fun RequestsExecutor.sendGame(
|
||||
chatId, game.title, disableNotification, replyToMessageId, replyMarkup
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.sendGame(
|
||||
suspend fun TelegramBot.sendGame(
|
||||
chat: Chat,
|
||||
game: Game,
|
||||
disableNotification: Boolean = false,
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.send.media
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.InputFile
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.media.SendAnimation
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
|
||||
@ -9,7 +9,7 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.KeyboardMarkup
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.files.AnimationFile
|
||||
|
||||
suspend fun RequestsExecutor.sendAnimation(
|
||||
suspend fun TelegramBot.sendAnimation(
|
||||
chatId: ChatIdentifier,
|
||||
animation: InputFile,
|
||||
thumb: InputFile? = null,
|
||||
@ -37,7 +37,7 @@ suspend fun RequestsExecutor.sendAnimation(
|
||||
)
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.sendAnimation(
|
||||
suspend fun TelegramBot.sendAnimation(
|
||||
chatId: ChatIdentifier,
|
||||
animation: AnimationFile,
|
||||
text: String? = null,
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.send.media
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.InputFile
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.media.SendAudio
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
|
||||
@ -9,7 +9,7 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.KeyboardMarkup
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.files.AudioFile
|
||||
|
||||
suspend fun RequestsExecutor.sendAudio(
|
||||
suspend fun TelegramBot.sendAudio(
|
||||
chatId: ChatIdentifier,
|
||||
audio: InputFile,
|
||||
thumb: InputFile? = null,
|
||||
@ -37,7 +37,7 @@ suspend fun RequestsExecutor.sendAudio(
|
||||
)
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.sendAudio(
|
||||
suspend fun TelegramBot.sendAudio(
|
||||
chatId: ChatIdentifier,
|
||||
audio: AudioFile,
|
||||
text: String? = null,
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.send.media
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.InputFile
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.media.SendDocument
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
|
||||
@ -9,7 +9,7 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.KeyboardMarkup
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.files.DocumentFile
|
||||
|
||||
suspend fun RequestsExecutor.sendDocument(
|
||||
suspend fun TelegramBot.sendDocument(
|
||||
chatId: ChatIdentifier,
|
||||
document: InputFile,
|
||||
thumb: InputFile? = null,
|
||||
@ -31,7 +31,7 @@ suspend fun RequestsExecutor.sendDocument(
|
||||
)
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.sendDocument(
|
||||
suspend fun TelegramBot.sendDocument(
|
||||
chatId: ChatIdentifier,
|
||||
document: DocumentFile,
|
||||
text: String? = null,
|
||||
|
@ -1,13 +1,13 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.send.media
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.media.SendMediaGroup
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.InputMedia.MediaGroupMemberInputMedia
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.MessageIdentifier
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.Chat
|
||||
|
||||
suspend fun RequestsExecutor.sendMediaGroup(
|
||||
suspend fun TelegramBot.sendMediaGroup(
|
||||
chatId: ChatIdentifier,
|
||||
media: List<MediaGroupMemberInputMedia>,
|
||||
disableNotification: Boolean = false,
|
||||
@ -18,7 +18,7 @@ suspend fun RequestsExecutor.sendMediaGroup(
|
||||
)
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.sendMediaGroup(
|
||||
suspend fun TelegramBot.sendMediaGroup(
|
||||
chat: Chat,
|
||||
media: List<MediaGroupMemberInputMedia>,
|
||||
disableNotification: Boolean = false,
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.send.media
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.InputFile
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.media.SendPhoto
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
|
||||
@ -8,7 +8,7 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.MessageIdentifier
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.KeyboardMarkup
|
||||
|
||||
suspend fun RequestsExecutor.sendPhoto(
|
||||
suspend fun TelegramBot.sendPhoto(
|
||||
chatId: ChatIdentifier,
|
||||
fileId: InputFile,
|
||||
caption: String? = null,
|
||||
|
@ -1,13 +1,13 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.send.media
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.InputFile
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.media.SendSticker
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.MessageIdentifier
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.KeyboardMarkup
|
||||
|
||||
suspend fun RequestsExecutor.sendSticker(
|
||||
suspend fun TelegramBot.sendSticker(
|
||||
chatId: ChatIdentifier,
|
||||
sticker: InputFile,
|
||||
disableNotification: Boolean = false,
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.send.media
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.InputFile
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.media.SendVideo
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
|
||||
@ -9,7 +9,7 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.KeyboardMarkup
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.files.VideoFile
|
||||
|
||||
suspend fun RequestsExecutor.sendVideo(
|
||||
suspend fun TelegramBot.sendVideo(
|
||||
chatId: ChatIdentifier,
|
||||
video: InputFile,
|
||||
thumb: InputFile? = null,
|
||||
@ -38,7 +38,7 @@ suspend fun RequestsExecutor.sendVideo(
|
||||
)
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.sendVideo(
|
||||
suspend fun TelegramBot.sendVideo(
|
||||
chatId: ChatIdentifier,
|
||||
video: VideoFile,
|
||||
text: String? = null,
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.send.media
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.InputFile
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.media.SendVideoNote
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
|
||||
@ -9,7 +9,7 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.KeyboardMarkup
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.files.VideoFile
|
||||
|
||||
suspend fun RequestsExecutor.sendVideoNote(
|
||||
suspend fun TelegramBot.sendVideoNote(
|
||||
chatId: ChatIdentifier,
|
||||
videoNote: InputFile,
|
||||
thumb: InputFile? = null,
|
||||
@ -35,7 +35,7 @@ suspend fun RequestsExecutor.sendVideoNote(
|
||||
)
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.sendVideoNote(
|
||||
suspend fun TelegramBot.sendVideoNote(
|
||||
chatId: ChatIdentifier,
|
||||
videoNote: VideoFile,
|
||||
text: String? = null,
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.send.media
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.InputFile
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.media.SendVoice
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
|
||||
@ -9,7 +9,7 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.KeyboardMarkup
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.files.AudioFile
|
||||
|
||||
suspend fun RequestsExecutor.sendVoice(
|
||||
suspend fun TelegramBot.sendVoice(
|
||||
chatId: ChatIdentifier,
|
||||
voice: InputFile,
|
||||
thumb: InputFile? = null,
|
||||
@ -33,7 +33,7 @@ suspend fun RequestsExecutor.sendVoice(
|
||||
)
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.sendVoice(
|
||||
suspend fun TelegramBot.sendVoice(
|
||||
chatId: ChatIdentifier,
|
||||
voice: AudioFile,
|
||||
text: String? = null,
|
||||
|
@ -1,13 +1,13 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.send.payments
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.payments.SendInvoice
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.payments.LabeledPrice
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.payments.abstracts.Currency
|
||||
|
||||
suspend fun RequestsExecutor.sendInvoice(
|
||||
suspend fun TelegramBot.sendInvoice(
|
||||
chatId: ChatId,
|
||||
title: String,
|
||||
description: String,
|
||||
@ -31,7 +31,7 @@ suspend fun RequestsExecutor.sendInvoice(
|
||||
SendInvoice(chatId, title, description, payload, providerToken, startParameter, currency, prices, providerData, requireName, requirePhoneNumber, requireEmail, requireShippingAddress, shouldSendPhoneNumberToProvider, shouldSendEmailToProvider, priceDependOnShipAddress, disableNotification, replyToMessageId, replyMarkup)
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.sendInvoice(
|
||||
suspend fun TelegramBot.sendInvoice(
|
||||
user: CommonUser,
|
||||
title: String,
|
||||
description: String,
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.send.polls
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.polls.SendQuizPoll
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.polls.SendRegularPoll
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
|
||||
@ -10,7 +10,7 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.KeyboardMarkup
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.Chat
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.polls.*
|
||||
|
||||
suspend fun RequestsExecutor.sendRegularPoll(
|
||||
suspend fun TelegramBot.sendRegularPoll(
|
||||
chatId: ChatIdentifier,
|
||||
question: String,
|
||||
options: List<String>,
|
||||
@ -26,7 +26,7 @@ suspend fun RequestsExecutor.sendRegularPoll(
|
||||
chatId, question, options, isAnonymous, isClosed, allowMultipleAnswers, closeInfo, disableNotification, replyToMessageId, replyMarkup
|
||||
)
|
||||
)
|
||||
suspend fun RequestsExecutor.sendRegularPoll(
|
||||
suspend fun TelegramBot.sendRegularPoll(
|
||||
chatId: ChatIdentifier,
|
||||
poll: RegularPoll,
|
||||
isClosed: Boolean = false,
|
||||
@ -44,7 +44,7 @@ suspend fun RequestsExecutor.sendRegularPoll(
|
||||
)
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.sendRegularPoll(
|
||||
suspend fun TelegramBot.sendRegularPoll(
|
||||
chat: Chat,
|
||||
question: String,
|
||||
options: List<String>,
|
||||
@ -59,7 +59,7 @@ suspend fun RequestsExecutor.sendRegularPoll(
|
||||
chat.id, question, options, isAnonymous, isClosed, allowMultipleAnswers, closeInfo, disableNotification, replyToMessageId, replyMarkup
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.sendRegularPoll(
|
||||
suspend fun TelegramBot.sendRegularPoll(
|
||||
chat: Chat,
|
||||
poll: RegularPoll,
|
||||
isClosed: Boolean = false,
|
||||
@ -76,7 +76,7 @@ suspend fun RequestsExecutor.sendRegularPoll(
|
||||
)
|
||||
|
||||
|
||||
suspend fun RequestsExecutor.sendQuizPoll(
|
||||
suspend fun TelegramBot.sendQuizPoll(
|
||||
chatId: ChatIdentifier,
|
||||
question: String,
|
||||
options: List<String>,
|
||||
@ -95,7 +95,7 @@ suspend fun RequestsExecutor.sendQuizPoll(
|
||||
)
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.sendQuizPoll(
|
||||
suspend fun TelegramBot.sendQuizPoll(
|
||||
chat: Chat,
|
||||
question: String,
|
||||
options: List<String>,
|
||||
@ -112,7 +112,7 @@ suspend fun RequestsExecutor.sendQuizPoll(
|
||||
chat.id, question, options, correctOptionId, isAnonymous, isClosed, explanation, parseMode, closeInfo, disableNotification, replyToMessageId, replyMarkup
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.sendQuizPoll(
|
||||
suspend fun TelegramBot.sendQuizPoll(
|
||||
chatId: ChatIdentifier,
|
||||
isClosed: Boolean = false,
|
||||
quizPoll: QuizPoll,
|
||||
@ -132,7 +132,7 @@ suspend fun RequestsExecutor.sendQuizPoll(
|
||||
)
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.sendQuizPoll(
|
||||
suspend fun TelegramBot.sendQuizPoll(
|
||||
chat: Chat,
|
||||
isClosed: Boolean = false,
|
||||
quizPoll: QuizPoll,
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.stickers
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.FileId
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.MultipartFile
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.stickers.AddAnimatedStickerToSet
|
||||
@ -9,7 +9,7 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.UserId
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.stickers.MaskPosition
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.stickers.StickerSet
|
||||
|
||||
suspend fun RequestsExecutor.addAnimatedStickerToSet(
|
||||
suspend fun TelegramBot.addAnimatedStickerToSet(
|
||||
userId: UserId,
|
||||
stickerSetName: String,
|
||||
sticker: FileId,
|
||||
@ -19,7 +19,7 @@ suspend fun RequestsExecutor.addAnimatedStickerToSet(
|
||||
AddAnimatedStickerToSet(userId, stickerSetName, sticker, emojis, maskPosition)
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.addAnimatedStickerToSet(
|
||||
suspend fun TelegramBot.addAnimatedStickerToSet(
|
||||
userId: UserId,
|
||||
stickerSetName: String,
|
||||
sticker: MultipartFile,
|
||||
@ -29,7 +29,7 @@ suspend fun RequestsExecutor.addAnimatedStickerToSet(
|
||||
AddAnimatedStickerToSet(userId, stickerSetName, sticker, emojis, maskPosition)
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.addAnimatedStickerToSet(
|
||||
suspend fun TelegramBot.addAnimatedStickerToSet(
|
||||
user: CommonUser,
|
||||
stickerSetName: String,
|
||||
sticker: FileId,
|
||||
@ -39,7 +39,7 @@ suspend fun RequestsExecutor.addAnimatedStickerToSet(
|
||||
user.id, stickerSetName, sticker, emojis, maskPosition
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.addAnimatedStickerToSet(
|
||||
suspend fun TelegramBot.addAnimatedStickerToSet(
|
||||
user: CommonUser,
|
||||
stickerSetName: String,
|
||||
sticker: MultipartFile,
|
||||
@ -49,7 +49,7 @@ suspend fun RequestsExecutor.addAnimatedStickerToSet(
|
||||
user.id, stickerSetName, sticker, emojis, maskPosition
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.addAnimatedStickerToSet(
|
||||
suspend fun TelegramBot.addAnimatedStickerToSet(
|
||||
userId: UserId,
|
||||
stickerSet: StickerSet,
|
||||
sticker: FileId,
|
||||
@ -59,7 +59,7 @@ suspend fun RequestsExecutor.addAnimatedStickerToSet(
|
||||
userId, stickerSet.name, sticker, emojis, maskPosition
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.addAnimatedStickerToSet(
|
||||
suspend fun TelegramBot.addAnimatedStickerToSet(
|
||||
userId: UserId,
|
||||
stickerSet: StickerSet,
|
||||
sticker: MultipartFile,
|
||||
@ -69,7 +69,7 @@ suspend fun RequestsExecutor.addAnimatedStickerToSet(
|
||||
userId, stickerSet.name, sticker, emojis, maskPosition
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.addAnimatedStickerToSet(
|
||||
suspend fun TelegramBot.addAnimatedStickerToSet(
|
||||
user: CommonUser,
|
||||
stickerSet: StickerSet,
|
||||
sticker: FileId,
|
||||
@ -79,7 +79,7 @@ suspend fun RequestsExecutor.addAnimatedStickerToSet(
|
||||
user.id, stickerSet.name, sticker, emojis, maskPosition
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.addAnimatedStickerToSet(
|
||||
suspend fun TelegramBot.addAnimatedStickerToSet(
|
||||
user: CommonUser,
|
||||
stickerSet: StickerSet,
|
||||
sticker: MultipartFile,
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.stickers
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.FileId
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.MultipartFile
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.stickers.AddStaticStickerToSet
|
||||
@ -9,7 +9,7 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.UserId
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.stickers.MaskPosition
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.stickers.StickerSet
|
||||
|
||||
suspend fun RequestsExecutor.addStaticStickerToSet(
|
||||
suspend fun TelegramBot.addStaticStickerToSet(
|
||||
userId: UserId,
|
||||
stickerSetName: String,
|
||||
sticker: FileId,
|
||||
@ -19,7 +19,7 @@ suspend fun RequestsExecutor.addStaticStickerToSet(
|
||||
AddStaticStickerToSet(userId, stickerSetName, sticker, emojis, maskPosition)
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.addStaticStickerToSet(
|
||||
suspend fun TelegramBot.addStaticStickerToSet(
|
||||
userId: UserId,
|
||||
stickerSetName: String,
|
||||
sticker: MultipartFile,
|
||||
@ -29,7 +29,7 @@ suspend fun RequestsExecutor.addStaticStickerToSet(
|
||||
AddStaticStickerToSet(userId, stickerSetName, sticker, emojis, maskPosition)
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.addStaticStickerToSet(
|
||||
suspend fun TelegramBot.addStaticStickerToSet(
|
||||
user: CommonUser,
|
||||
stickerSetName: String,
|
||||
sticker: FileId,
|
||||
@ -39,7 +39,7 @@ suspend fun RequestsExecutor.addStaticStickerToSet(
|
||||
user.id, stickerSetName, sticker, emojis, maskPosition
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.addStaticStickerToSet(
|
||||
suspend fun TelegramBot.addStaticStickerToSet(
|
||||
user: CommonUser,
|
||||
stickerSetName: String,
|
||||
sticker: MultipartFile,
|
||||
@ -49,7 +49,7 @@ suspend fun RequestsExecutor.addStaticStickerToSet(
|
||||
user.id, stickerSetName, sticker, emojis, maskPosition
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.addStaticStickerToSet(
|
||||
suspend fun TelegramBot.addStaticStickerToSet(
|
||||
userId: UserId,
|
||||
stickerSet: StickerSet,
|
||||
sticker: FileId,
|
||||
@ -59,7 +59,7 @@ suspend fun RequestsExecutor.addStaticStickerToSet(
|
||||
userId, stickerSet.name, sticker, emojis, maskPosition
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.addStaticStickerToSet(
|
||||
suspend fun TelegramBot.addStaticStickerToSet(
|
||||
userId: UserId,
|
||||
stickerSet: StickerSet,
|
||||
sticker: MultipartFile,
|
||||
@ -69,7 +69,7 @@ suspend fun RequestsExecutor.addStaticStickerToSet(
|
||||
userId, stickerSet.name, sticker, emojis, maskPosition
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.addStaticStickerToSet(
|
||||
suspend fun TelegramBot.addStaticStickerToSet(
|
||||
user: CommonUser,
|
||||
stickerSet: StickerSet,
|
||||
sticker: FileId,
|
||||
@ -79,7 +79,7 @@ suspend fun RequestsExecutor.addStaticStickerToSet(
|
||||
user.id, stickerSet.name, sticker, emojis, maskPosition
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.addStaticStickerToSet(
|
||||
suspend fun TelegramBot.addStaticStickerToSet(
|
||||
user: CommonUser,
|
||||
stickerSet: StickerSet,
|
||||
sticker: MultipartFile,
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.stickers
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.FileId
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.MultipartFile
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.stickers.CreateNewAnimatedStickerSet
|
||||
@ -8,7 +8,7 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.CommonUser
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.UserId
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.stickers.MaskPosition
|
||||
|
||||
suspend fun RequestsExecutor.createNewAnimatedStickerSet(
|
||||
suspend fun TelegramBot.createNewAnimatedStickerSet(
|
||||
userId: UserId,
|
||||
name: String,
|
||||
sticker: FileId,
|
||||
@ -19,7 +19,7 @@ suspend fun RequestsExecutor.createNewAnimatedStickerSet(
|
||||
CreateNewAnimatedStickerSet(userId, name, sticker, emojis, containsMasks, maskPosition)
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.createNewAnimatedStickerSet(
|
||||
suspend fun TelegramBot.createNewAnimatedStickerSet(
|
||||
userId: UserId,
|
||||
name: String,
|
||||
sticker: MultipartFile,
|
||||
@ -31,7 +31,7 @@ suspend fun RequestsExecutor.createNewAnimatedStickerSet(
|
||||
)
|
||||
|
||||
|
||||
suspend fun RequestsExecutor.createNewAnimatedStickerSet(
|
||||
suspend fun TelegramBot.createNewAnimatedStickerSet(
|
||||
user: CommonUser,
|
||||
name: String,
|
||||
sticker: FileId,
|
||||
@ -42,7 +42,7 @@ suspend fun RequestsExecutor.createNewAnimatedStickerSet(
|
||||
user.id, name, sticker, emojis, containsMasks, maskPosition
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.createNewAnimatedStickerSet(
|
||||
suspend fun TelegramBot.createNewAnimatedStickerSet(
|
||||
user: CommonUser,
|
||||
name: String,
|
||||
sticker: MultipartFile,
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.stickers
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.FileId
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.MultipartFile
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.stickers.CreateNewStaticStickerSet
|
||||
@ -8,7 +8,7 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.CommonUser
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.UserId
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.stickers.MaskPosition
|
||||
|
||||
suspend fun RequestsExecutor.createNewStaticStickerSet(
|
||||
suspend fun TelegramBot.createNewStaticStickerSet(
|
||||
userId: UserId,
|
||||
name: String,
|
||||
sticker: FileId,
|
||||
@ -19,7 +19,7 @@ suspend fun RequestsExecutor.createNewStaticStickerSet(
|
||||
CreateNewStaticStickerSet(userId, name, sticker, emojis, containsMasks, maskPosition)
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.createNewStaticStickerSet(
|
||||
suspend fun TelegramBot.createNewStaticStickerSet(
|
||||
userId: UserId,
|
||||
name: String,
|
||||
sticker: MultipartFile,
|
||||
@ -31,7 +31,7 @@ suspend fun RequestsExecutor.createNewStaticStickerSet(
|
||||
)
|
||||
|
||||
|
||||
suspend fun RequestsExecutor.createNewStaticStickerSet(
|
||||
suspend fun TelegramBot.createNewStaticStickerSet(
|
||||
user: CommonUser,
|
||||
name: String,
|
||||
sticker: FileId,
|
||||
@ -42,7 +42,7 @@ suspend fun RequestsExecutor.createNewStaticStickerSet(
|
||||
user.id, name, sticker, emojis, containsMasks, maskPosition
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.createNewStaticStickerSet(
|
||||
suspend fun TelegramBot.createNewStaticStickerSet(
|
||||
user: CommonUser,
|
||||
name: String,
|
||||
sticker: MultipartFile,
|
||||
|
@ -1,11 +1,11 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.stickers
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.FileId
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.stickers.DeleteStickerFromSet
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.files.Sticker
|
||||
|
||||
suspend fun RequestsExecutor.deleteStickerFromSet(
|
||||
suspend fun TelegramBot.deleteStickerFromSet(
|
||||
sticker: FileId
|
||||
) = execute(
|
||||
DeleteStickerFromSet(
|
||||
@ -13,7 +13,7 @@ suspend fun RequestsExecutor.deleteStickerFromSet(
|
||||
)
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.deleteStickerFromSet(
|
||||
suspend fun TelegramBot.deleteStickerFromSet(
|
||||
sticker: Sticker
|
||||
) = deleteStickerFromSet(
|
||||
sticker.fileId
|
||||
|
@ -1,11 +1,11 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.stickers
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.FileId
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.stickers.SetStickerPositionInSet
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.files.Sticker
|
||||
|
||||
suspend fun RequestsExecutor.setStickerPositionInSet(
|
||||
suspend fun TelegramBot.setStickerPositionInSet(
|
||||
sticker: FileId,
|
||||
position: Int
|
||||
) = execute(
|
||||
@ -15,7 +15,7 @@ suspend fun RequestsExecutor.setStickerPositionInSet(
|
||||
)
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.setStickerPositionInSet(
|
||||
suspend fun TelegramBot.setStickerPositionInSet(
|
||||
sticker: Sticker,
|
||||
position: Int
|
||||
) = setStickerPositionInSet(
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.thumbs
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.FileId
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.MultipartFile
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.stickers.SetStickerSetThumb
|
||||
@ -8,7 +8,7 @@ import com.github.insanusmokrassar.TelegramBotAPI.types.CommonUser
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.UserId
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.stickers.StickerSet
|
||||
|
||||
suspend fun RequestsExecutor.setStickerSetThumb(
|
||||
suspend fun TelegramBot.setStickerSetThumb(
|
||||
userId: UserId,
|
||||
thumbSetName: String,
|
||||
thumb: FileId
|
||||
@ -16,7 +16,7 @@ suspend fun RequestsExecutor.setStickerSetThumb(
|
||||
SetStickerSetThumb(userId, thumbSetName, thumb)
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.setStickerSetThumb(
|
||||
suspend fun TelegramBot.setStickerSetThumb(
|
||||
userId: UserId,
|
||||
thumbSetName: String,
|
||||
thumb: MultipartFile
|
||||
@ -24,7 +24,7 @@ suspend fun RequestsExecutor.setStickerSetThumb(
|
||||
SetStickerSetThumb(userId, thumbSetName, thumb)
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.setStickerSetThumb(
|
||||
suspend fun TelegramBot.setStickerSetThumb(
|
||||
user: CommonUser,
|
||||
thumbSetName: String,
|
||||
thumb: FileId
|
||||
@ -32,7 +32,7 @@ suspend fun RequestsExecutor.setStickerSetThumb(
|
||||
user.id, thumbSetName, thumb
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.setStickerSetThumb(
|
||||
suspend fun TelegramBot.setStickerSetThumb(
|
||||
user: CommonUser,
|
||||
thumbSetName: String,
|
||||
thumb: MultipartFile
|
||||
@ -40,7 +40,7 @@ suspend fun RequestsExecutor.setStickerSetThumb(
|
||||
user.id, thumbSetName, thumb
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.setStickerSetThumb(
|
||||
suspend fun TelegramBot.setStickerSetThumb(
|
||||
userId: UserId,
|
||||
thumbSet: StickerSet,
|
||||
thumb: FileId
|
||||
@ -48,7 +48,7 @@ suspend fun RequestsExecutor.setStickerSetThumb(
|
||||
userId, thumbSet.name, thumb
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.setStickerSetThumb(
|
||||
suspend fun TelegramBot.setStickerSetThumb(
|
||||
userId: UserId,
|
||||
thumbSet: StickerSet,
|
||||
thumb: MultipartFile
|
||||
@ -56,7 +56,7 @@ suspend fun RequestsExecutor.setStickerSetThumb(
|
||||
userId, thumbSet.name, thumb
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.setStickerSetThumb(
|
||||
suspend fun TelegramBot.setStickerSetThumb(
|
||||
user: CommonUser,
|
||||
thumbSet: StickerSet,
|
||||
thumb: FileId
|
||||
@ -64,7 +64,7 @@ suspend fun RequestsExecutor.setStickerSetThumb(
|
||||
user.id, thumbSet.name, thumb
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.setStickerSetThumb(
|
||||
suspend fun TelegramBot.setStickerSetThumb(
|
||||
user: CommonUser,
|
||||
thumbSet: StickerSet,
|
||||
thumb: MultipartFile
|
||||
|
@ -1,19 +1,19 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.stickers
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.MultipartFile
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.stickers.UploadStickerFile
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.CommonUser
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.UserId
|
||||
|
||||
suspend fun RequestsExecutor.uploadStickerFile(
|
||||
suspend fun TelegramBot.uploadStickerFile(
|
||||
userId: UserId,
|
||||
sticker: MultipartFile
|
||||
) = execute(
|
||||
UploadStickerFile(userId, sticker)
|
||||
)
|
||||
|
||||
suspend fun RequestsExecutor.uploadStickerFile(
|
||||
suspend fun TelegramBot.uploadStickerFile(
|
||||
user: CommonUser,
|
||||
sticker: MultipartFile
|
||||
) = execute(
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.webhook
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.webhook.DeleteWebhook
|
||||
|
||||
suspend fun RequestsExecutor.deleteWebhook() = execute(DeleteWebhook())
|
||||
suspend fun TelegramBot.deleteWebhook() = execute(DeleteWebhook())
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.webhook
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.webhook.GetWebhookInfo
|
||||
|
||||
suspend fun RequestsExecutor.getWebhookInfo() = execute(GetWebhookInfo())
|
||||
suspend fun TelegramBot.getWebhookInfo() = execute(GetWebhookInfo())
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.webhook
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.TelegramBot
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.FileId
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.MultipartFile
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.webhook.SetWebhook
|
||||
@ -8,7 +8,7 @@ import com.github.insanusmokrassar.TelegramBotAPI.requests.webhook.SetWebhook
|
||||
/**
|
||||
* Use this method to send information about webhook (like [url])
|
||||
*/
|
||||
suspend fun RequestsExecutor.setWebhookInfo(
|
||||
suspend fun TelegramBot.setWebhookInfo(
|
||||
url: String,
|
||||
maxAllowedConnections: Int? = null,
|
||||
allowedUpdates: List<String>? = null
|
||||
@ -21,7 +21,7 @@ suspend fun RequestsExecutor.setWebhookInfo(
|
||||
/**
|
||||
* Use this method to send information about webhook (like [url] and [certificate])
|
||||
*/
|
||||
suspend fun RequestsExecutor.setWebhookInfo(
|
||||
suspend fun TelegramBot.setWebhookInfo(
|
||||
url: String,
|
||||
certificate: FileId,
|
||||
maxAllowedConnections: Int? = null,
|
||||
@ -35,7 +35,7 @@ suspend fun RequestsExecutor.setWebhookInfo(
|
||||
/**
|
||||
* Use this method to send information about webhook (like [url] and [certificate])
|
||||
*/
|
||||
suspend fun RequestsExecutor.setWebhookInfo(
|
||||
suspend fun TelegramBot.setWebhookInfo(
|
||||
url: String,
|
||||
certificate: MultipartFile,
|
||||
maxAllowedConnections: Int? = null,
|
||||
|
Loading…
Reference in New Issue
Block a user