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