mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-21 15:53:47 +00:00
remove deprecations
This commit is contained in:
parent
e7aec75aca
commit
416187e079
@ -2,6 +2,8 @@
|
||||
|
||||
## 2.0.0
|
||||
|
||||
___ALL PREVIOUS DEPRECATIONS HAVE BEEN REMOVED___
|
||||
|
||||
* `Behaviour Builder`:
|
||||
* Mappers have been removed from waiters extensions
|
||||
* Triggers extensions now will use filtering inside of context receiver instead of passing the filters into `BehaviourContext`. That means that in the subcontext will not be used preinstalled filters for their `BehaviourContext` and filter of trigger will not be used in subcontext
|
||||
|
@ -1,92 +0,0 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.edit.LiveLocation
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.chat.Chat
|
||||
import dev.inmo.tgbotapi.types.location.LiveLocation
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||
import dev.inmo.tgbotapi.types.message.content.LocationContent
|
||||
import dev.inmo.tgbotapi.extensions.api.edit.location.live.editLiveLocation
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
@Deprecated("Replaced", ReplaceWith("editLiveLocation", "dev.inmo.tgbotapi.extensions.api.edit.location.live.editLiveLocation"))
|
||||
suspend fun TelegramBot.editLiveLocation(
|
||||
chatId: ChatIdentifier,
|
||||
messageId: MessageIdentifier,
|
||||
latitude: Double,
|
||||
longitude: Double,
|
||||
horizontalAccuracy: Meters? = null,
|
||||
heading: Degrees? = null,
|
||||
proximityAlertRadius: Meters? = null,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = editLiveLocation(chatId, messageId, latitude, longitude, horizontalAccuracy, heading, proximityAlertRadius, replyMarkup)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
@Deprecated("Replaced", ReplaceWith("editLiveLocation", "dev.inmo.tgbotapi.extensions.api.edit.location.live.editLiveLocation"))
|
||||
suspend fun TelegramBot.editLiveLocation(
|
||||
chat: Chat,
|
||||
messageId: MessageIdentifier,
|
||||
latitude: Double,
|
||||
longitude: Double,
|
||||
horizontalAccuracy: Meters? = null,
|
||||
heading: Degrees? = null,
|
||||
proximityAlertRadius: Meters? = null,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = editLiveLocation(chat, messageId, latitude, longitude, horizontalAccuracy, heading, proximityAlertRadius, replyMarkup)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
@Deprecated("Replaced", ReplaceWith("editLiveLocation", "dev.inmo.tgbotapi.extensions.api.edit.location.live.editLiveLocation"))
|
||||
suspend fun TelegramBot.editLiveLocation(
|
||||
message: ContentMessage<LocationContent>,
|
||||
latitude: Double,
|
||||
longitude: Double,
|
||||
horizontalAccuracy: Meters? = null,
|
||||
heading: Degrees? = null,
|
||||
proximityAlertRadius: Meters? = null,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = editLiveLocation(message, latitude, longitude, horizontalAccuracy, heading, proximityAlertRadius, replyMarkup)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
@Deprecated("Replaced", ReplaceWith("editLiveLocation", "dev.inmo.tgbotapi.extensions.api.edit.location.live.editLiveLocation"))
|
||||
suspend fun TelegramBot.editLiveLocation(
|
||||
chatId: ChatIdentifier,
|
||||
messageId: MessageIdentifier,
|
||||
location: LiveLocation,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = editLiveLocation(chatId, messageId, location, replyMarkup)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
@Deprecated("Replaced", ReplaceWith("editLiveLocation", "dev.inmo.tgbotapi.extensions.api.edit.location.live.editLiveLocation"))
|
||||
suspend fun TelegramBot.editLiveLocation(
|
||||
chat: Chat,
|
||||
messageId: MessageIdentifier,
|
||||
location: LiveLocation,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = editLiveLocation(chat, messageId, location, replyMarkup)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
@Deprecated("Replaced", ReplaceWith("editLiveLocation", "dev.inmo.tgbotapi.extensions.api.edit.location.live.editLiveLocation"))
|
||||
suspend fun TelegramBot.editLiveLocation(
|
||||
message: ContentMessage<LocationContent>,
|
||||
location: LiveLocation,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = editLiveLocation(message, location, replyMarkup)
|
@ -1,25 +0,0 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.edit.LiveLocation
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.extensions.api.edit.location.live.editLiveLocation
|
||||
import dev.inmo.tgbotapi.requests.edit.location.live.EditInlineMessageLiveLocation
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.location.LiveLocation
|
||||
|
||||
@Deprecated("Replaced", ReplaceWith("editLiveLocation", "dev.inmo.tgbotapi.extensions.api.edit.location.live.editLiveLocation"))
|
||||
suspend fun TelegramBot.editLiveLocation(
|
||||
inlineMessageId: InlineMessageIdentifier,
|
||||
latitude: Double,
|
||||
longitude: Double,
|
||||
horizontalAccuracy: Meters? = null,
|
||||
heading: Degrees? = null,
|
||||
proximityAlertRadius: Meters? = null,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = editLiveLocation(inlineMessageId, latitude, longitude, horizontalAccuracy, heading, proximityAlertRadius, replyMarkup)
|
||||
@Deprecated("Replaced", ReplaceWith("editLiveLocation", "dev.inmo.tgbotapi.extensions.api.edit.location.live.editLiveLocation"))
|
||||
suspend fun TelegramBot.editLiveLocation(
|
||||
inlineMessageId: InlineMessageIdentifier,
|
||||
location: LiveLocation,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = editLiveLocation(inlineMessageId, location, replyMarkup)
|
@ -1,43 +0,0 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.edit.LiveLocation
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.extensions.api.edit.location.live.stopLiveLocation
|
||||
import dev.inmo.tgbotapi.requests.edit.location.live.StopChatMessageLiveLocation
|
||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||
import dev.inmo.tgbotapi.types.MessageIdentifier
|
||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.chat.Chat
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||
import dev.inmo.tgbotapi.types.message.content.LocationContent
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
@Deprecated("Replaced", ReplaceWith("stopLiveLocation", "dev.inmo.tgbotapi.extensions.api.edit.location.live.stopLiveLocation"))
|
||||
suspend fun TelegramBot.stopLiveLocation(
|
||||
chatId: ChatIdentifier,
|
||||
messageId: MessageIdentifier,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = stopLiveLocation(chatId, messageId, replyMarkup)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
@Deprecated("Replaced", ReplaceWith("stopLiveLocation", "dev.inmo.tgbotapi.extensions.api.edit.location.live.stopLiveLocation"))
|
||||
suspend fun TelegramBot.stopLiveLocation(
|
||||
chat: Chat,
|
||||
messageId: MessageIdentifier,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = stopLiveLocation(chat, messageId, replyMarkup)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
@Deprecated("Replaced", ReplaceWith("stopLiveLocation", "dev.inmo.tgbotapi.extensions.api.edit.location.live.stopLiveLocation"))
|
||||
suspend fun TelegramBot.stopLiveLocation(
|
||||
message: ContentMessage<LocationContent>,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = stopLiveLocation(message, replyMarkup)
|
@ -1,17 +0,0 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.edit.LiveLocation
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.extensions.api.edit.location.live.stopLiveLocation
|
||||
import dev.inmo.tgbotapi.requests.edit.location.live.StopInlineMessageLiveLocation
|
||||
import dev.inmo.tgbotapi.types.InlineMessageIdentifier
|
||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
@Deprecated("Replaced", ReplaceWith("stopLiveLocation", "dev.inmo.tgbotapi.extensions.api.edit.location.live.stopLiveLocation"))
|
||||
suspend fun TelegramBot.stopLiveLocation(
|
||||
inlineMessageId: InlineMessageIdentifier,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = stopLiveLocation(inlineMessageId, replyMarkup)
|
@ -1,42 +0,0 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.edit.ReplyMarkup
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.extensions.api.edit.reply_markup.editMessageReplyMarkup
|
||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||
import dev.inmo.tgbotapi.types.MessageIdentifier
|
||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.chat.Chat
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.Message
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
@Deprecated("Replaced", ReplaceWith("editMessageReplyMarkup", "dev.inmo.tgbotapi.extensions.api.edit.reply_markup.editMessageReplyMarkup"))
|
||||
suspend fun TelegramBot.editMessageReplyMarkup(
|
||||
chatId: ChatIdentifier,
|
||||
messageId: MessageIdentifier,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = editMessageReplyMarkup(chatId, messageId, replyMarkup)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
@Deprecated("Replaced", ReplaceWith("editMessageReplyMarkup", "dev.inmo.tgbotapi.extensions.api.edit.reply_markup.editMessageReplyMarkup"))
|
||||
suspend fun TelegramBot.editMessageReplyMarkup(
|
||||
chat: Chat,
|
||||
messageId: MessageIdentifier,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = editMessageReplyMarkup(chat, messageId, replyMarkup)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
@Deprecated("Replaced", ReplaceWith("editMessageReplyMarkup", "dev.inmo.tgbotapi.extensions.api.edit.reply_markup.editMessageReplyMarkup"))
|
||||
suspend fun TelegramBot.editMessageReplyMarkup(
|
||||
message: Message,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = editMessageReplyMarkup(message, replyMarkup)
|
||||
|
@ -1,17 +0,0 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.edit.ReplyMarkup
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.extensions.api.edit.reply_markup.editMessageReplyMarkup
|
||||
import dev.inmo.tgbotapi.requests.edit.reply_markup.EditInlineMessageReplyMarkup
|
||||
import dev.inmo.tgbotapi.types.InlineMessageIdentifier
|
||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
@Deprecated("Replaced", ReplaceWith("editMessageReplyMarkup", "dev.inmo.tgbotapi.extensions.api.edit.reply_markup.editMessageReplyMarkup"))
|
||||
suspend fun TelegramBot.editMessageReplyMarkup(
|
||||
inlineMessageId: InlineMessageIdentifier,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = editMessageReplyMarkup(inlineMessageId, replyMarkup)
|
@ -13,9 +13,6 @@ import dev.inmo.tgbotapi.updateshandlers.FlowsUpdatesFilter
|
||||
import kotlinx.coroutines.*
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
|
||||
@Deprecated("Will be removed soon")
|
||||
typealias BehaviourContextWithFSMBuilder<T> = BehaviourContextWithFSM<T>
|
||||
|
||||
/**
|
||||
* Creates [BehaviourContextWithFSM] via creating of [DefaultBehaviourContext] with [this] as [TelegramBot],
|
||||
* [scope] as target scope for that [DefaultBehaviourContext] and [upstreamUpdatesFlow]. Pass [statesManager]
|
||||
|
@ -1,10 +0,0 @@
|
||||
package dev.inmo.tgbotapi.extensions.behaviour_builder
|
||||
|
||||
import dev.inmo.micro_utils.fsm.common.utils.StateHandlingErrorHandler
|
||||
|
||||
@Deprecated("Has been added in microutils", ReplaceWith("StateHandlingErrorHandler", "dev.inmo.micro_utils.fsm.common.utils.StateHandlingErrorHandler"))
|
||||
typealias StateHandlingErrorHandler<T> = StateHandlingErrorHandler<T>
|
||||
@Deprecated("Has been added in microutils", ReplaceWith("DefaultStateHandlingErrorHandler", "dev.inmo.micro_utils.fsm.common.utils.DefaultStateHandlingErrorHandler"))
|
||||
val DefaultStateHandlingErrorHandler = dev.inmo.micro_utils.fsm.common.utils.DefaultStateHandlingErrorHandler
|
||||
@Deprecated("Has been added in microutils", ReplaceWith("defaultStateHandlingErrorHandler", "dev.inmo.micro_utils.fsm.common.utils.defaultStateHandlingErrorHandler"))
|
||||
inline fun <T> defaultStateHandlingErrorHandler() = dev.inmo.micro_utils.fsm.common.utils.defaultStateHandlingErrorHandler<T>()
|
@ -80,7 +80,7 @@ class DefaultBehaviourContext(
|
||||
onBufferOverflow: BufferOverflow = BufferOverflow.SUSPEND,
|
||||
private val upstreamUpdatesFlow: Flow<Update>? = null,
|
||||
override val triggersHolder: TriggersHolder = TriggersHolder(),
|
||||
@Deprecated("This method is not used anymore")
|
||||
@Deprecated("This parameter is not used anymore")
|
||||
private val updatesFilter: BehaviourContextAndTypeReceiver<Boolean, Update>? = null
|
||||
) : AbstractFlowsUpdatesFilter(), TelegramBot by bot, CoroutineScope by scope, BehaviourContext {
|
||||
|
||||
@ -208,48 +208,6 @@ suspend fun <T, BC : BehaviourContext> BC.createSubContextAndDoWithUpdatesFilter
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates new one [BehaviourContext] using [createSubContext] and launches [behaviourContextReceiver] in a new context
|
||||
* using [doInContext]
|
||||
*
|
||||
* @param stopOnCompletion ___TRUE BY DEFAULT___
|
||||
*/
|
||||
@Deprecated("Renamed", ReplaceWith("createSubContextAndDoWithUpdatesFilter", "dev.inmo.tgbotapi.extensions.behaviour_builder.createSubContextAndDoWithUpdatesFilter"))
|
||||
suspend fun <T, BC : BehaviourContext> BC.doInSubContextWithUpdatesFilter(
|
||||
updatesFilter: CustomBehaviourContextAndTypeReceiver<BC, Boolean, Update>?,
|
||||
stopOnCompletion: Boolean = true,
|
||||
updatesUpstreamFlow: Flow<Update> = allUpdatesFlow,
|
||||
scope: CoroutineScope = LinkedSupervisorScope(),
|
||||
triggersHolder: TriggersHolder = this.triggersHolder,
|
||||
behaviourContextReceiver: CustomBehaviourContextReceiver<BC, T>
|
||||
): T {
|
||||
return createSubContext(
|
||||
scope,
|
||||
triggersHolder,
|
||||
updatesUpstreamFlow,
|
||||
updatesFilter
|
||||
).doInContext(
|
||||
stopOnCompletion,
|
||||
behaviourContextReceiver
|
||||
)
|
||||
}
|
||||
|
||||
@Deprecated("Redundant", ReplaceWith("createSubContextAndDoWithUpdatesFilter", "dev.inmo.tgbotapi.extensions.behaviour_builder.createSubContextAndDoWithUpdatesFilter"))
|
||||
suspend fun <T> BehaviourContext.doInSubContext(
|
||||
stopOnCompletion: Boolean = true,
|
||||
updatesUpstreamFlow: Flow<Update> = allUpdatesFlow,
|
||||
scope: CoroutineScope = LinkedSupervisorScope(),
|
||||
triggersHolder: TriggersHolder = this.triggersHolder,
|
||||
behaviourContextReceiver: BehaviourContextReceiver<T>
|
||||
) = createSubContextAndDoWithUpdatesFilter(
|
||||
scope,
|
||||
triggersHolder,
|
||||
updatesUpstreamFlow,
|
||||
updatesFilter = null,
|
||||
stopOnCompletion,
|
||||
behaviourContextReceiver
|
||||
)
|
||||
|
||||
/**
|
||||
* This method will cancel ALL subsequent contexts, expectations and waiters
|
||||
*/
|
||||
|
@ -45,26 +45,6 @@ suspend fun BehaviourContext.waitChatEvents(
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEvents<ChatEvent>(initRequest, errorFactory)
|
||||
|
||||
@Deprecated("Renamed as Video instead of Voice")
|
||||
suspend fun BehaviourContext.waitVoiceChatEvents(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEvents<VideoChatEvent>(initRequest, errorFactory)
|
||||
@Deprecated("Renamed as Video instead of Voice")
|
||||
suspend fun BehaviourContext.waitVoiceChatStartedEvents(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEvents<VideoChatStarted>(initRequest, errorFactory)
|
||||
@Deprecated("Renamed as Video instead of Voice")
|
||||
suspend fun BehaviourContext.waitVoiceChatEndedEvents(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEvents<VideoChatEnded>(initRequest, errorFactory)
|
||||
@Deprecated("Renamed as Video instead of Voice")
|
||||
suspend fun BehaviourContext.waitVoiceChatParticipantsInvitedEvents(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEvents<VideoChatParticipantsInvited>(initRequest, errorFactory)
|
||||
|
||||
suspend fun BehaviourContext.waitVideoChatEvents(
|
||||
initRequest: Request<*>? = null,
|
||||
|
@ -43,27 +43,6 @@ suspend fun BehaviourContext.waitChatEventsMessages(
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEventsMessages<ChatEvent>(initRequest, errorFactory)
|
||||
|
||||
@Deprecated("Renamed as Video instead of Voice")
|
||||
suspend fun BehaviourContext.waitVoiceChatEventsMessages(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEventsMessages<VideoChatEvent>(initRequest, errorFactory)
|
||||
@Deprecated("Renamed as Video instead of Voice")
|
||||
suspend fun BehaviourContext.waitVoiceChatStartedEventsMessages(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEventsMessages<VideoChatStarted>(initRequest, errorFactory)
|
||||
@Deprecated("Renamed as Video instead of Voice")
|
||||
suspend fun BehaviourContext.waitVoiceChatEndedEventsMessages(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEventsMessages<VideoChatEnded>(initRequest, errorFactory)
|
||||
@Deprecated("Renamed as Video instead of Voice")
|
||||
suspend fun BehaviourContext.waitVoiceChatParticipantsInvitedEventsMessages(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEventsMessages<VideoChatParticipantsInvited>(initRequest, errorFactory)
|
||||
|
||||
suspend fun BehaviourContext.waitVideoChatEventsMessages(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
|
@ -84,86 +84,6 @@ suspend fun <BC : BehaviourContext> BC.onChatEvent(
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatEventMessage<ChatEvent>>
|
||||
) = onEvent(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
|
||||
* @param subcontextUpdatesFilter This filter will be applied to each update inside of [scenarioReceiver]. For example,
|
||||
* this filter will be used if you will call [dev.inmo.tgbotapi.extensions.behaviour_builder.expectations.waitContentMessage].
|
||||
* Use [dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContextAndTwoTypesReceiver] function to create your own.
|
||||
* Use [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.plus] or [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.times]
|
||||
* to combinate several filters
|
||||
* @param [markerFactory] Will be used to identify different "stream". [scenarioReceiver] will be called synchronously
|
||||
* in one "stream". Output of [markerFactory] will be used as a key for "stream"
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
@Deprecated("Renamed as Video instead of Voice")
|
||||
suspend fun <BC : BehaviourContext> BC.onVoiceChatEvent(
|
||||
initialFilter: SimpleFilter<ChatEventMessage<VideoChatEvent>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatEventMessage<VideoChatEvent>, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in ChatEventMessage<VideoChatEvent>, Any> = ByChatMessageMarkerFactory,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatEventMessage<VideoChatEvent>>
|
||||
) = onEvent(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
|
||||
* @param subcontextUpdatesFilter This filter will be applied to each update inside of [scenarioReceiver]. For example,
|
||||
* this filter will be used if you will call [dev.inmo.tgbotapi.extensions.behaviour_builder.expectations.waitContentMessage].
|
||||
* Use [dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContextAndTwoTypesReceiver] function to create your own.
|
||||
* Use [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.plus] or [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.times]
|
||||
* to combinate several filters
|
||||
* @param [markerFactory] Will be used to identify different "stream". [scenarioReceiver] will be called synchronously
|
||||
* in one "stream". Output of [markerFactory] will be used as a key for "stream"
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
@Deprecated("Renamed as Video instead of Voice")
|
||||
suspend fun <BC : BehaviourContext> BC.onVoiceChatStartedEvent(
|
||||
initialFilter: SimpleFilter<ChatEventMessage<VideoChatStarted>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatEventMessage<VideoChatStarted>, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in ChatEventMessage<VideoChatStarted>, Any> = ByChatMessageMarkerFactory,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatEventMessage<VideoChatStarted>>
|
||||
) = onEvent(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
|
||||
* @param subcontextUpdatesFilter This filter will be applied to each update inside of [scenarioReceiver]. For example,
|
||||
* this filter will be used if you will call [dev.inmo.tgbotapi.extensions.behaviour_builder.expectations.waitContentMessage].
|
||||
* Use [dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContextAndTwoTypesReceiver] function to create your own.
|
||||
* Use [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.plus] or [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.times]
|
||||
* to combinate several filters
|
||||
* @param [markerFactory] Will be used to identify different "stream". [scenarioReceiver] will be called synchronously
|
||||
* in one "stream". Output of [markerFactory] will be used as a key for "stream"
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
@Deprecated("Renamed as Video instead of Voice")
|
||||
suspend fun <BC : BehaviourContext> BC.onVoiceChatEndedEvent(
|
||||
initialFilter: SimpleFilter<ChatEventMessage<VideoChatEnded>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatEventMessage<VideoChatEnded>, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in ChatEventMessage<VideoChatEnded>, Any> = ByChatMessageMarkerFactory,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatEventMessage<VideoChatEnded>>
|
||||
) = onEvent(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
|
||||
* @param subcontextUpdatesFilter This filter will be applied to each update inside of [scenarioReceiver]. For example,
|
||||
* this filter will be used if you will call [dev.inmo.tgbotapi.extensions.behaviour_builder.expectations.waitContentMessage].
|
||||
* Use [dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContextAndTwoTypesReceiver] function to create your own.
|
||||
* Use [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.plus] or [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.times]
|
||||
* to combinate several filters
|
||||
* @param [markerFactory] Will be used to identify different "stream". [scenarioReceiver] will be called synchronously
|
||||
* in one "stream". Output of [markerFactory] will be used as a key for "stream"
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
@Deprecated("Renamed as Video instead of Voice")
|
||||
suspend fun <BC : BehaviourContext> BC.onVoiceChatParticipantsInvitedEvent(
|
||||
initialFilter: SimpleFilter<ChatEventMessage<VideoChatParticipantsInvited>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatEventMessage<VideoChatParticipantsInvited>, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in ChatEventMessage<VideoChatParticipantsInvited>, Any> = ByChatMessageMarkerFactory,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatEventMessage<VideoChatParticipantsInvited>>
|
||||
) = onEvent(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
|
||||
* @param subcontextUpdatesFilter This filter will be applied to each update inside of [scenarioReceiver]. For example,
|
||||
|
@ -1,4 +0,0 @@
|
||||
package dev.inmo.tgbotapi.CommonAbstracts
|
||||
|
||||
@Deprecated("Replaced", ReplaceWith("CommonContactData", "dev.inmo.tgbotapi.abstracts.CommonContactData"))
|
||||
typealias CommonContactData = dev.inmo.tgbotapi.abstracts.CommonContactData
|
@ -1,4 +0,0 @@
|
||||
package dev.inmo.tgbotapi.CommonAbstracts
|
||||
|
||||
@Deprecated("Replaced", ReplaceWith("CommonSendInvoiceData", "dev.inmo.tgbotapi.abstracts.CommonSendInvoiceData"))
|
||||
typealias CommonSendInvoiceData = dev.inmo.tgbotapi.abstracts.CommonSendInvoiceData
|
@ -1,4 +0,0 @@
|
||||
package dev.inmo.tgbotapi.CommonAbstracts
|
||||
|
||||
@Deprecated("Replaced", ReplaceWith("CommonVenueData", "dev.inmo.tgbotapi.abstracts.CommonVenueData"))
|
||||
typealias CommonVenueData = dev.inmo.tgbotapi.abstracts.CommonVenueData
|
@ -1,4 +0,0 @@
|
||||
package dev.inmo.tgbotapi.CommonAbstracts
|
||||
|
||||
@Deprecated("Replaced", ReplaceWith("FromUser", "dev.inmo.tgbotapi.abstracts.FromUser"))
|
||||
typealias FromUser = dev.inmo.tgbotapi.abstracts.FromUser
|
@ -1,4 +0,0 @@
|
||||
package dev.inmo.tgbotapi.CommonAbstracts
|
||||
|
||||
@Deprecated("Replaced", ReplaceWith("Headed", "dev.inmo.tgbotapi.abstracts.Headed"))
|
||||
typealias Headed = dev.inmo.tgbotapi.abstracts.Headed
|
@ -1,4 +0,0 @@
|
||||
package dev.inmo.tgbotapi.CommonAbstracts
|
||||
|
||||
@Deprecated("Replaced", ReplaceWith("HorizontallyAccured", "dev.inmo.tgbotapi.abstracts.HorizontallyAccured"))
|
||||
typealias HorizontallyAccured = dev.inmo.tgbotapi.abstracts.HorizontallyAccured
|
@ -1,4 +0,0 @@
|
||||
package dev.inmo.tgbotapi.CommonAbstracts
|
||||
|
||||
@Deprecated("Replaced", ReplaceWith("Livable", "dev.inmo.tgbotapi.abstracts.Livable"))
|
||||
typealias Livable = dev.inmo.tgbotapi.abstracts.Livable
|
@ -1,4 +0,0 @@
|
||||
package dev.inmo.tgbotapi.CommonAbstracts
|
||||
|
||||
@Deprecated("Replaced", ReplaceWith("Locationed", "dev.inmo.tgbotapi.abstracts.Locationed"))
|
||||
typealias Locationed = dev.inmo.tgbotapi.abstracts.Locationed
|
@ -1,4 +0,0 @@
|
||||
package dev.inmo.tgbotapi.CommonAbstracts
|
||||
|
||||
@Deprecated("Replaced", ReplaceWith("MimeTyped", "dev.inmo.tgbotapi.abstracts.MimeTyped"))
|
||||
typealias MimeTyped = dev.inmo.tgbotapi.abstracts.MimeTyped
|
@ -1,4 +0,0 @@
|
||||
package dev.inmo.tgbotapi.CommonAbstracts
|
||||
|
||||
@Deprecated("Replaced", ReplaceWith("Performerable", "dev.inmo.tgbotapi.abstracts.Performerable"))
|
||||
typealias Performerable = dev.inmo.tgbotapi.abstracts.Performerable
|
@ -1,4 +0,0 @@
|
||||
package dev.inmo.tgbotapi.CommonAbstracts
|
||||
|
||||
@Deprecated("Replaced", ReplaceWith("ProximityAlertable", "dev.inmo.tgbotapi.abstracts.ProximityAlertable"))
|
||||
typealias ProximityAlertable = dev.inmo.tgbotapi.abstracts.ProximityAlertable
|
@ -1,18 +0,0 @@
|
||||
package dev.inmo.tgbotapi.CommonAbstracts
|
||||
|
||||
@Deprecated("Replaced", ReplaceWith("Texted", "dev.inmo.tgbotapi.abstracts.Texted"))
|
||||
typealias Texted = dev.inmo.tgbotapi.abstracts.Texted
|
||||
@Deprecated("Replaced", ReplaceWith("TextedWithTextSources", "dev.inmo.tgbotapi.abstracts.TextedWithTextSources"))
|
||||
typealias TextedWithTextSources = dev.inmo.tgbotapi.abstracts.TextedWithTextSources
|
||||
|
||||
@Deprecated("Replaced", ReplaceWith("ParsableOutput", "dev.inmo.tgbotapi.abstracts.ParsableOutput"))
|
||||
typealias ParsableOutput = dev.inmo.tgbotapi.abstracts.ParsableOutput
|
||||
|
||||
@Deprecated("Replaced", ReplaceWith("EntitiesOutput", "dev.inmo.tgbotapi.abstracts.EntitiesOutput"))
|
||||
typealias EntitiesOutput = dev.inmo.tgbotapi.abstracts.EntitiesOutput
|
||||
|
||||
@Deprecated("Replaced", ReplaceWith("TextedOutput", "dev.inmo.tgbotapi.abstracts.TextedOutput"))
|
||||
typealias TextedOutput = dev.inmo.tgbotapi.abstracts.TextedOutput
|
||||
|
||||
@Deprecated("Replaced", ReplaceWith("TextedInput", "dev.inmo.tgbotapi.abstracts.TextedInput"))
|
||||
typealias TextedInput = dev.inmo.tgbotapi.abstracts.TextedInput
|
@ -1,4 +0,0 @@
|
||||
package dev.inmo.tgbotapi.CommonAbstracts
|
||||
|
||||
@Deprecated("Replaced", ReplaceWith("Titled", "dev.inmo.tgbotapi.abstracts.Titled"))
|
||||
typealias Titled = dev.inmo.tgbotapi.abstracts.Titled
|
@ -1,4 +0,0 @@
|
||||
package dev.inmo.tgbotapi.CommonAbstracts
|
||||
|
||||
@Deprecated("Replaced", ReplaceWith("WithUser", "dev.inmo.tgbotapi.abstracts.WithUser"))
|
||||
typealias WithUser = dev.inmo.tgbotapi.abstracts.WithUser
|
@ -1,4 +0,0 @@
|
||||
package dev.inmo.tgbotapi.CommonAbstracts.types
|
||||
|
||||
@Deprecated("Replaced", ReplaceWith("ChatRequest", "dev.inmo.tgbotapi.abstracts.types.ChatRequest"))
|
||||
typealias ChatRequest = dev.inmo.tgbotapi.abstracts.types.ChatRequest
|
@ -1,4 +0,0 @@
|
||||
package dev.inmo.tgbotapi.CommonAbstracts.types
|
||||
|
||||
@Deprecated("Replaced", ReplaceWith("DisableNotification", "dev.inmo.tgbotapi.abstracts.types.DisableNotification"))
|
||||
typealias DisableNotification = dev.inmo.tgbotapi.abstracts.types.DisableNotification
|
@ -1,4 +0,0 @@
|
||||
package dev.inmo.tgbotapi.CommonAbstracts.types
|
||||
|
||||
@Deprecated("Replaced", ReplaceWith("DisableWebPagePreview", "dev.inmo.tgbotapi.abstracts.types.DisableWebPagePreview"))
|
||||
typealias DisableWebPagePreview = dev.inmo.tgbotapi.abstracts.types.DisableWebPagePreview
|
@ -1,4 +0,0 @@
|
||||
package dev.inmo.tgbotapi.CommonAbstracts.types
|
||||
|
||||
@Deprecated("Replaced", ReplaceWith("InlineMessageAction", "dev.inmo.tgbotapi.abstracts.types.InlineMessageAction"))
|
||||
typealias InlineMessageAction = dev.inmo.tgbotapi.abstracts.types.InlineMessageAction
|
@ -1,4 +0,0 @@
|
||||
package dev.inmo.tgbotapi.CommonAbstracts.types
|
||||
|
||||
@Deprecated("Replaced", ReplaceWith("MessageAction:", "dev.inmo.tgbotapi.abstracts.types.MessageAction:"))
|
||||
typealias MessageAction = dev.inmo.tgbotapi.abstracts.types.MessageAction
|
@ -1,4 +0,0 @@
|
||||
package dev.inmo.tgbotapi.CommonAbstracts.types
|
||||
|
||||
@Deprecated("Replaced", ReplaceWith("OptionalChatRequest", "dev.inmo.tgbotapi.abstracts.types.OptionalChatRequest"))
|
||||
typealias OptionalChatRequest = dev.inmo.tgbotapi.abstracts.types.OptionalChatRequest
|
@ -1,4 +0,0 @@
|
||||
package dev.inmo.tgbotapi.CommonAbstracts.types
|
||||
|
||||
@Deprecated("Replaced", ReplaceWith("ProtectContent", "dev.inmo.tgbotapi.abstracts.types.ProtectContent"))
|
||||
typealias ProtectContent = dev.inmo.tgbotapi.abstracts.types.ProtectContent
|
@ -1,4 +0,0 @@
|
||||
package dev.inmo.tgbotapi.CommonAbstracts.types
|
||||
|
||||
@Deprecated("Replaced", ReplaceWith("ReplyMarkup", "dev.inmo.tgbotapi.abstracts.types.ReplyMarkup"))
|
||||
typealias ReplyMarkup = dev.inmo.tgbotapi.abstracts.types.ReplyMarkup
|
@ -1,4 +0,0 @@
|
||||
package dev.inmo.tgbotapi.CommonAbstracts.types
|
||||
|
||||
@Deprecated("Replaced", ReplaceWith("ReplyMessageId", "dev.inmo.tgbotapi.abstracts.types.ReplyMessageId"))
|
||||
typealias ReplyMessageId = dev.inmo.tgbotapi.abstracts.types.ReplyMessageId
|
@ -1,4 +0,0 @@
|
||||
package dev.inmo.tgbotapi.CommonAbstracts.types
|
||||
|
||||
@Deprecated("Replaced", ReplaceWith("UntilDate", "dev.inmo.tgbotapi.abstracts.types.UntilDate"))
|
||||
typealias UntilDate = dev.inmo.tgbotapi.abstracts.types.UntilDate
|
@ -1,4 +0,0 @@
|
||||
package dev.inmo.tgbotapi.bot.Ktor
|
||||
|
||||
@Deprecated("Replaced", ReplaceWith("KtorCallFactory", "dev.inmo.tgbotapi.bot.ktor.KtorCallFactory"))
|
||||
typealias KtorCallFactory = dev.inmo.tgbotapi.bot.ktor.KtorCallFactory
|
@ -1,32 +0,0 @@
|
||||
package dev.inmo.tgbotapi.bot.Ktor
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.utils.*
|
||||
|
||||
@RiskFeature
|
||||
@Deprecated("Replaced", ReplaceWith("createTelegramBotDefaultKtorCallRequestsFactories", "dev.inmo.tgbotapi.bot.ktor.createTelegramBotDefaultKtorCallRequestsFactories"))
|
||||
fun createTelegramBotDefaultKtorCallRequestsFactories() = dev.inmo.tgbotapi.bot.ktor.createTelegramBotDefaultKtorCallRequestsFactories()
|
||||
|
||||
@Deprecated("Replaced", ReplaceWith("KtorRequestsExecutor", "dev.inmo.tgbotapi.bot.ktor.KtorRequestsExecutor"))
|
||||
typealias KtorRequestsExecutor = dev.inmo.tgbotapi.bot.ktor.KtorRequestsExecutor
|
||||
|
||||
@Deprecated("Replaced", ReplaceWith("KtorRequestsExecutorBuilder", "dev.inmo.tgbotapi.bot.ktor.KtorRequestsExecutorBuilder"))
|
||||
typealias KtorRequestsExecutorBuilder = dev.inmo.tgbotapi.bot.ktor.KtorRequestsExecutorBuilder
|
||||
|
||||
@Deprecated("telegramBot", ReplaceWith("createTelegramBotDefaultKtorCallRequestsFactories", "dev.inmo.tgbotapi.bot.ktor.telegramBot"))
|
||||
inline fun telegramBot(
|
||||
telegramAPIUrlsKeeper: TelegramAPIUrlsKeeper,
|
||||
builder: KtorRequestsExecutorBuilder.() -> Unit = {}
|
||||
): TelegramBot = dev.inmo.tgbotapi.bot.ktor.telegramBot(telegramAPIUrlsKeeper, builder)
|
||||
|
||||
/**
|
||||
* Shortcut for [telegramBot]
|
||||
*/
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
@Deprecated("telegramBot", ReplaceWith("createTelegramBotDefaultKtorCallRequestsFactories", "dev.inmo.tgbotapi.bot.ktor.telegramBot"))
|
||||
inline fun telegramBot(
|
||||
token: String,
|
||||
apiUrl: String = telegramBotAPIDefaultUrl,
|
||||
testServer: Boolean = false,
|
||||
builder: KtorRequestsExecutorBuilder.() -> Unit = {}
|
||||
): TelegramBot = telegramBot(TelegramAPIUrlsKeeper(token, testServer, apiUrl), builder)
|
@ -1,6 +0,0 @@
|
||||
package dev.inmo.tgbotapi.bot.Ktor.base
|
||||
|
||||
var defaultUpdateTimeoutForZeroDelay = dev.inmo.tgbotapi.bot.ktor.base.defaultUpdateTimeoutForZeroDelay
|
||||
|
||||
@Deprecated("Replaced", ReplaceWith("AbstractRequestCallFactory", "dev.inmo.tgbotapi.bot.ktor.base.AbstractRequestCallFactory"))
|
||||
typealias AbstractRequestCallFactory = dev.inmo.tgbotapi.bot.ktor.base.AbstractRequestCallFactory
|
@ -1,4 +0,0 @@
|
||||
package dev.inmo.tgbotapi.bot.Ktor.base
|
||||
|
||||
@Deprecated("Replaced", ReplaceWith("DownloadFileChannelRequestCallFactory", "dev.inmo.tgbotapi.bot.ktor.base.DownloadFileRequestCallFactory"))
|
||||
typealias DownloadFileChannelRequestCallFactory = dev.inmo.tgbotapi.bot.ktor.base.DownloadFileRequestCallFactory
|
@ -1,4 +0,0 @@
|
||||
package dev.inmo.tgbotapi.bot.Ktor.base
|
||||
|
||||
@Deprecated("Replaced", ReplaceWith("DownloadFileRequestCallFactory", "dev.inmo.tgbotapi.bot.ktor.base.DownloadFileRequestCallFactory"))
|
||||
typealias DownloadFileRequestCallFactory = dev.inmo.tgbotapi.bot.ktor.base.DownloadFileRequestCallFactory
|
@ -1,4 +0,0 @@
|
||||
package dev.inmo.tgbotapi.bot.Ktor.base
|
||||
|
||||
@Deprecated("Replaced", ReplaceWith("MultipartRequestCallFactory", "dev.inmo.tgbotapi.bot.ktor.base.MultipartRequestCallFactory"))
|
||||
typealias MultipartRequestCallFactory = dev.inmo.tgbotapi.bot.ktor.base.MultipartRequestCallFactory
|
@ -1,4 +0,0 @@
|
||||
package dev.inmo.tgbotapi.bot.Ktor.base
|
||||
|
||||
@Deprecated("Replaced", ReplaceWith("SimpleRequestCallFactory", "dev.inmo.tgbotapi.bot.ktor.base.SimpleRequestCallFactory"))
|
||||
typealias SimpleRequestCallFactory = dev.inmo.tgbotapi.bot.ktor.base.SimpleRequestCallFactory
|
@ -79,21 +79,8 @@ data class MultipartFile (
|
||||
override val fileId: String = "${uuid4()}.${filename.fileExtension}"
|
||||
val input: Input
|
||||
get() = inputSource()
|
||||
|
||||
@Deprecated("Storage file now is not necessary")
|
||||
constructor(
|
||||
file: StorageFile,
|
||||
filename: String = file.fileName
|
||||
) : this(
|
||||
filename,
|
||||
file::input
|
||||
)
|
||||
}
|
||||
|
||||
@Deprecated("Storage file now is not necessary")
|
||||
@Suppress("NOTHING_TO_INLINE", "unused")
|
||||
inline fun StorageFile.asMultipartFile() = MultipartFile(fileName, ::input)
|
||||
|
||||
@Suppress("NOTHING_TO_INLINE", "unused")
|
||||
suspend inline fun ByteReadChannel.asMultipartFile(
|
||||
fileName: String
|
||||
|
@ -1,7 +0,0 @@
|
||||
package dev.inmo.tgbotapi.requests.edit.LiveLocation
|
||||
|
||||
@Deprecated("Replaced", ReplaceWith("editMessageLiveLocationMethod", "dev.inmo.tgbotapi.requests.edit.location.live.editMessageLiveLocationMethod"))
|
||||
const val editMessageLiveLocationMethod = dev.inmo.tgbotapi.requests.edit.location.live.editMessageLiveLocationMethod
|
||||
|
||||
@Deprecated("Replaced", ReplaceWith("EditChatMessageLiveLocation", "dev.inmo.tgbotapi.requests.edit.location.live.EditChatMessageLiveLocation"))
|
||||
typealias EditChatMessageLiveLocation = dev.inmo.tgbotapi.requests.edit.location.live.EditChatMessageLiveLocation
|
@ -1,4 +0,0 @@
|
||||
package dev.inmo.tgbotapi.requests.edit.LiveLocation
|
||||
|
||||
@Deprecated("Replaced", ReplaceWith("EditInlineMessageLiveLocation", "dev.inmo.tgbotapi.requests.edit.location.live.EditInlineMessageLiveLocation"))
|
||||
typealias EditInlineMessageLiveLocation = dev.inmo.tgbotapi.requests.edit.location.live.EditInlineMessageLiveLocation
|
@ -1,7 +0,0 @@
|
||||
package dev.inmo.tgbotapi.requests.edit.LiveLocation
|
||||
|
||||
@Deprecated("Replaced", ReplaceWith("stopMessageLiveLocationMethod", "dev.inmo.tgbotapi.requests.edit.location.live.stopMessageLiveLocationMethod"))
|
||||
const val stopMessageLiveLocationMethod = dev.inmo.tgbotapi.requests.edit.location.live.stopMessageLiveLocationMethod
|
||||
|
||||
@Deprecated("Replaced", ReplaceWith("StopChatMessageLiveLocation", "dev.inmo.tgbotapi.requests.edit.location.live.StopChatMessageLiveLocation"))
|
||||
typealias StopChatMessageLiveLocation = dev.inmo.tgbotapi.requests.edit.location.live.StopChatMessageLiveLocation
|
@ -1,4 +0,0 @@
|
||||
package dev.inmo.tgbotapi.requests.edit.LiveLocation
|
||||
|
||||
@Deprecated("Replaced", ReplaceWith("StopInlineMessageLiveLocation", "dev.inmo.tgbotapi.requests.edit.location.live.StopInlineMessageLiveLocation"))
|
||||
typealias StopInlineMessageLiveLocation = dev.inmo.tgbotapi.requests.edit.location.live.StopInlineMessageLiveLocation
|
@ -1,7 +0,0 @@
|
||||
package dev.inmo.tgbotapi.requests.edit.ReplyMarkup
|
||||
|
||||
@Deprecated("Replaced", ReplaceWith("editMessageReplyMarkupMethod", "dev.inmo.tgbotapi.requests.edit.reply_markup.editMessageReplyMarkupMethod"))
|
||||
const val editMessageReplyMarkupMethod = dev.inmo.tgbotapi.requests.edit.reply_markup.editMessageReplyMarkupMethod
|
||||
|
||||
@Deprecated("Replaced", ReplaceWith("EditChatMessageReplyMarkup", "dev.inmo.tgbotapi.requests.edit.reply_markup.EditChatMessageReplyMarkup"))
|
||||
typealias EditChatMessageReplyMarkup = dev.inmo.tgbotapi.requests.edit.reply_markup.EditChatMessageReplyMarkup
|
@ -1,4 +0,0 @@
|
||||
package dev.inmo.tgbotapi.requests.edit.ReplyMarkup
|
||||
|
||||
@Deprecated("Replaced", ReplaceWith("EditInlineMessageReplyMarkup", "dev.inmo.tgbotapi.requests.edit.reply_markup.EditInlineMessageReplyMarkup"))
|
||||
typealias EditInlineMessageReplyMarkup = dev.inmo.tgbotapi.requests.edit.reply_markup.EditInlineMessageReplyMarkup
|
@ -1,7 +0,0 @@
|
||||
package dev.inmo.tgbotapi.types.CallbackQuery
|
||||
|
||||
@Deprecated("Replaced", ReplaceWith("CallbackQuery", "dev.inmo.tgbotapi.types.queries.callback.CallbackQuery"))
|
||||
typealias CallbackQuery = dev.inmo.tgbotapi.types.queries.callback.CallbackQuery
|
||||
|
||||
@Deprecated("Replaced", ReplaceWith("UnknownCallbackQueryType", "dev.inmo.tgbotapi.types.queries.callback.UnknownCallbackQueryType"))
|
||||
typealias UnknownCallbackQueryType = dev.inmo.tgbotapi.types.queries.callback.UnknownCallbackQueryType
|
@ -1,4 +0,0 @@
|
||||
package dev.inmo.tgbotapi.types.CallbackQuery
|
||||
|
||||
@Deprecated("Replaced", ReplaceWith("DataCallbackQuery", "dev.inmo.tgbotapi.types.queries.callback.DataCallbackQuery"))
|
||||
typealias DataCallbackQuery = dev.inmo.tgbotapi.types.queries.callback.DataCallbackQuery
|
@ -1,4 +0,0 @@
|
||||
package dev.inmo.tgbotapi.types.CallbackQuery
|
||||
|
||||
@Deprecated("Replaced", ReplaceWith("GameShortNameCallbackQuery", "dev.inmo.tgbotapi.types.queries.callback.GameShortNameCallbackQuery"))
|
||||
typealias GameShortNameCallbackQuery = dev.inmo.tgbotapi.types.queries.callback.GameShortNameCallbackQuery
|
@ -1,4 +0,0 @@
|
||||
package dev.inmo.tgbotapi.types.CallbackQuery
|
||||
|
||||
@Deprecated("Replaced", ReplaceWith("InlineMessageIdCallbackQuery", "dev.inmo.tgbotapi.types.queries.callback.InlineMessageIdCallbackQuery"))
|
||||
typealias InlineMessageIdCallbackQuery = dev.inmo.tgbotapi.types.queries.callback.InlineMessageIdCallbackQuery
|
@ -1,4 +0,0 @@
|
||||
package dev.inmo.tgbotapi.types.CallbackQuery
|
||||
|
||||
@Deprecated("Replaced", ReplaceWith("InlineMessageIdDataCallbackQuery", "dev.inmo.tgbotapi.types.queries.callback.InlineMessageIdDataCallbackQuery"))
|
||||
typealias InlineMessageIdDataCallbackQuery = dev.inmo.tgbotapi.types.queries.callback.InlineMessageIdDataCallbackQuery
|
@ -1,4 +0,0 @@
|
||||
package dev.inmo.tgbotapi.types.CallbackQuery
|
||||
|
||||
@Deprecated("Replaced", ReplaceWith("InlineMessageIdGameShortNameCallbackQuery", "dev.inmo.tgbotapi.types.queries.callback.InlineMessageIdGameShortNameCallbackQuery"))
|
||||
typealias InlineMessageIdGameShortNameCallbackQuery = dev.inmo.tgbotapi.types.queries.callback.InlineMessageIdGameShortNameCallbackQuery
|
@ -1,4 +0,0 @@
|
||||
package dev.inmo.tgbotapi.types.CallbackQuery
|
||||
|
||||
@Deprecated("Replaced", ReplaceWith("MessageCallbackQuery", "dev.inmo.tgbotapi.types.queries.callback.MessageCallbackQuery"))
|
||||
typealias MessageCallbackQuery = dev.inmo.tgbotapi.types.queries.callback.MessageCallbackQuery
|
@ -1,4 +0,0 @@
|
||||
package dev.inmo.tgbotapi.types.CallbackQuery
|
||||
|
||||
@Deprecated("Replaced", ReplaceWith("MessageDataCallbackQuery", "dev.inmo.tgbotapi.types.queries.callback.MessageDataCallbackQuery"))
|
||||
typealias MessageDataCallbackQuery = dev.inmo.tgbotapi.types.queries.callback.MessageDataCallbackQuery
|
@ -1,4 +0,0 @@
|
||||
package dev.inmo.tgbotapi.types.CallbackQuery
|
||||
|
||||
@Deprecated("Replaced", ReplaceWith("MessageGameShortNameCallbackQuery", "dev.inmo.tgbotapi.types.queries.callback.MessageGameShortNameCallbackQuery"))
|
||||
typealias MessageGameShortNameCallbackQuery = dev.inmo.tgbotapi.types.queries.callback.MessageGameShortNameCallbackQuery
|
@ -1,4 +0,0 @@
|
||||
package dev.inmo.tgbotapi.types
|
||||
|
||||
@Deprecated("Renamed", ReplaceWith("ChatAdministratorRightsImpl", "dev.inmo.tgbotapi.types.chat.member.ChatAdministratorRightsImpl"))
|
||||
typealias ChatAdministratorRightsImpl = dev.inmo.tgbotapi.types.chat.member.ChatAdministratorRightsImpl
|
@ -1,4 +0,0 @@
|
||||
package dev.inmo.tgbotapi.types.ChatMember
|
||||
|
||||
@Deprecated("AdministratorChatMemberImpl", ReplaceWith("AdministratorChatMemberImpl", "dev.inmo.tgbotapi.types.chat.member.AdministratorChatMemberImpl"))
|
||||
typealias AdministratorChatMemberImpl = dev.inmo.tgbotapi.types.chat.member.AdministratorChatMemberImpl
|
@ -1,4 +0,0 @@
|
||||
package dev.inmo.tgbotapi.types.ChatMember
|
||||
|
||||
@Deprecated("CreatorChatMember", ReplaceWith("CreatorChatMember", "dev.inmo.tgbotapi.types.chat.member.CreatorChatMember"))
|
||||
typealias CreatorChatMember = dev.inmo.tgbotapi.types.chat.member.CreatorChatMember
|
@ -1,4 +0,0 @@
|
||||
package dev.inmo.tgbotapi.types.ChatMember
|
||||
|
||||
@Deprecated("KickedChatMember", ReplaceWith("KickedChatMember", "dev.inmo.tgbotapi.types.chat.member.KickedChatMember"))
|
||||
typealias KickedChatMember = dev.inmo.tgbotapi.types.chat.member.KickedChatMember
|
@ -1,4 +0,0 @@
|
||||
package dev.inmo.tgbotapi.types.ChatMember
|
||||
|
||||
@Deprecated("LeftChatMemberImpl", ReplaceWith("LeftChatMemberImpl", "dev.inmo.tgbotapi.types.chat.member.LeftChatMemberImpl"))
|
||||
typealias LeftChatMemberImpl = dev.inmo.tgbotapi.types.chat.member.LeftChatMemberImpl
|
@ -1,4 +0,0 @@
|
||||
package dev.inmo.tgbotapi.types.ChatMember
|
||||
|
||||
@Deprecated("MemberChatMemberImpl", ReplaceWith("MemberChatMemberImpl", "dev.inmo.tgbotapi.types.chat.member.MemberChatMemberImpl"))
|
||||
typealias MemberChatMemberImpl = dev.inmo.tgbotapi.types.chat.member.MemberChatMemberImpl
|
@ -1,4 +0,0 @@
|
||||
package dev.inmo.tgbotapi.types.ChatMember
|
||||
|
||||
@Deprecated("RestrictedChatMember", ReplaceWith("RestrictedChatMember", "dev.inmo.tgbotapi.types.chat.member.RestrictedChatMember"))
|
||||
typealias RestrictedChatMember = dev.inmo.tgbotapi.types.chat.member.RestrictedChatMember
|
@ -1,7 +0,0 @@
|
||||
package dev.inmo.tgbotapi.types.ChatMember.abstracts
|
||||
|
||||
@Deprecated("AdministratorChatMember", ReplaceWith("AdministratorChatMember", "dev.inmo.tgbotapi.types.chat.member.AdministratorChatMember"))
|
||||
typealias AdministratorChatMember = dev.inmo.tgbotapi.types.chat.member.AdministratorChatMember
|
||||
|
||||
@Deprecated("AdministratorChatMemberSerializer", ReplaceWith("AdministratorChatMemberSerializer", "dev.inmo.tgbotapi.types.chat.member.AdministratorChatMemberSerializer"))
|
||||
typealias AdministratorChatMemberSerializer = dev.inmo.tgbotapi.types.chat.member.AdministratorChatMemberSerializer
|
@ -1,4 +0,0 @@
|
||||
package dev.inmo.tgbotapi.types.ChatMember.abstracts
|
||||
|
||||
@Deprecated("BannedChatMember", ReplaceWith("BannedChatMember", "dev.inmo.tgbotapi.types.chat.member.BannedChatMember"))
|
||||
typealias BannedChatMember = dev.inmo.tgbotapi.types.chat.member.BannedChatMember
|
@ -1,7 +0,0 @@
|
||||
package dev.inmo.tgbotapi.types.ChatMember.abstracts
|
||||
|
||||
@Deprecated("SpecialChatAdministratorRights", ReplaceWith("SpecialChatAdministratorRights", "dev.inmo.tgbotapi.types.chat.member.SpecialChatAdministratorRights"))
|
||||
typealias SpecialChatAdministratorRights = dev.inmo.tgbotapi.types.chat.member.SpecialChatAdministratorRights
|
||||
|
||||
@Deprecated("ChatAdministratorRights", ReplaceWith("ChatAdministratorRights", "dev.inmo.tgbotapi.types.chat.member.ChatAdministratorRights"))
|
||||
typealias ChatAdministratorRights = dev.inmo.tgbotapi.types.chat.member.ChatAdministratorRights
|
@ -1,7 +0,0 @@
|
||||
package dev.inmo.tgbotapi.types.ChatMember.abstracts
|
||||
|
||||
@Deprecated("ChatMember", ReplaceWith("ChatMember", "dev.inmo.tgbotapi.types.chat.member.ChatMember"))
|
||||
typealias ChatMember = dev.inmo.tgbotapi.types.chat.member.ChatMember
|
||||
|
||||
@Deprecated("ChatMemberSerializer", ReplaceWith("ChatMemberSerializer", "dev.inmo.tgbotapi.types.chat.member.ChatMemberSerializer"))
|
||||
typealias ChatMemberSerializer = dev.inmo.tgbotapi.types.chat.member.ChatMemberSerializer
|
@ -1,4 +0,0 @@
|
||||
package dev.inmo.tgbotapi.types.ChatMember.abstracts
|
||||
|
||||
@Deprecated("LeftChatMember", ReplaceWith("LeftChatMember", "dev.inmo.tgbotapi.types.chat.member.LeftChatMember"))
|
||||
typealias LeftChatMember = dev.inmo.tgbotapi.types.chat.member.LeftChatMember
|
@ -1,4 +0,0 @@
|
||||
package dev.inmo.tgbotapi.types.ChatMember.abstracts
|
||||
|
||||
@Deprecated("MemberChatMember", ReplaceWith("MemberChatMember", "dev.inmo.tgbotapi.types.chat.member.MemberChatMember"))
|
||||
typealias MemberChatMember = dev.inmo.tgbotapi.types.chat.member.MemberChatMember
|
@ -1,4 +0,0 @@
|
||||
package dev.inmo.tgbotapi.types.ChatMember.abstracts
|
||||
|
||||
@Deprecated("SpecialRightsChatMember", ReplaceWith("SpecialRightsChatMember", "dev.inmo.tgbotapi.types.chat.member.SpecialRightsChatMember"))
|
||||
typealias SpecialRightsChatMember = dev.inmo.tgbotapi.types.chat.member.SpecialRightsChatMember
|
@ -1,39 +0,0 @@
|
||||
package dev.inmo.tgbotapi.types.InputMedia
|
||||
|
||||
import dev.inmo.tgbotapi.requests.abstracts.InputFile
|
||||
import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList
|
||||
import dev.inmo.tgbotapi.types.message.toRawMessageEntities
|
||||
import dev.inmo.tgbotapi.types.message.ParseMode
|
||||
import dev.inmo.tgbotapi.types.media.TelegramMediaAnimation
|
||||
import dev.inmo.tgbotapi.utils.extensions.makeString
|
||||
|
||||
@Deprecated("Replaced and renamed", ReplaceWith("TelegramMediaAnimation", "dev.inmo.tgbotapi.types.media.TelegramMediaAnimation"))
|
||||
fun InputMediaAnimation(
|
||||
file: InputFile,
|
||||
text: String? = null,
|
||||
parseMode: ParseMode? = null,
|
||||
width: Int? = null,
|
||||
height: Int? = null,
|
||||
duration: Long? = null,
|
||||
thumb: InputFile? = null
|
||||
) = TelegramMediaAnimation(file, text, parseMode, null, width, height, duration, thumb)
|
||||
|
||||
@Deprecated("Replaced and renamed", ReplaceWith("TelegramMediaAnimation", "dev.inmo.tgbotapi.types.media.TelegramMediaAnimation"))
|
||||
fun InputMediaAnimation(
|
||||
file: InputFile,
|
||||
entities: TextSourcesList,
|
||||
width: Int? = null,
|
||||
height: Int? = null,
|
||||
duration: Long? = null,
|
||||
thumb: InputFile? = null
|
||||
) = TelegramMediaAnimation(
|
||||
file,
|
||||
entities.makeString(),
|
||||
null,
|
||||
entities.toRawMessageEntities(),
|
||||
width,
|
||||
height,
|
||||
duration,
|
||||
thumb
|
||||
)
|
||||
|
@ -1,62 +0,0 @@
|
||||
package dev.inmo.tgbotapi.types.InputMedia
|
||||
|
||||
import dev.inmo.tgbotapi.requests.abstracts.InputFile
|
||||
import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList
|
||||
import dev.inmo.tgbotapi.types.message.toRawMessageEntities
|
||||
import dev.inmo.tgbotapi.types.message.ParseMode
|
||||
import dev.inmo.tgbotapi.types.files.AudioFile
|
||||
import dev.inmo.tgbotapi.types.media.TelegramMediaAudio
|
||||
import dev.inmo.tgbotapi.utils.extensions.makeString
|
||||
|
||||
@Deprecated("Replaced and renamed", ReplaceWith("TelegramMediaAudio", "dev.inmo.tgbotapi.types.media.TelegramMediaAudio"))
|
||||
fun InputMediaAudio(
|
||||
file: InputFile,
|
||||
entities: TextSourcesList,
|
||||
duration: Long? = null,
|
||||
performer: String? = null,
|
||||
title: String? = null,
|
||||
thumb: InputFile? = null
|
||||
) = TelegramMediaAudio(
|
||||
file, entities.makeString(), null, entities.toRawMessageEntities(), duration, performer, title, thumb
|
||||
)
|
||||
|
||||
@Deprecated("Replaced and renamed", ReplaceWith("TelegramMediaAudio", "dev.inmo.tgbotapi.types.media.TelegramMediaAudio"))
|
||||
fun InputMediaAudio(
|
||||
file: InputFile,
|
||||
text: String? = null,
|
||||
parseMode: ParseMode? = null,
|
||||
duration: Long? = null,
|
||||
performer: String? = null,
|
||||
title: String? = null,
|
||||
thumb: InputFile? = null
|
||||
) = TelegramMediaAudio(
|
||||
file, text, parseMode, null, duration, performer, title, thumb
|
||||
)
|
||||
|
||||
@Deprecated("Replaced and renamed", ReplaceWith("TelegramMediaAudio", "dev.inmo.tgbotapi.types.media.TelegramMediaAudio"))
|
||||
fun AudioFile.toInputMediaAudio(
|
||||
text: String? = null,
|
||||
parseMode: ParseMode? = null,
|
||||
title: String? = this.title
|
||||
): InputMediaAudio = TelegramMediaAudio(
|
||||
fileId,
|
||||
text,
|
||||
parseMode,
|
||||
duration,
|
||||
performer,
|
||||
title,
|
||||
thumb ?.fileId
|
||||
)
|
||||
|
||||
@Deprecated("Replaced and renamed", ReplaceWith("TelegramMediaAudio", "dev.inmo.tgbotapi.types.media.TelegramMediaAudio"))
|
||||
fun AudioFile.toInputMediaAudio(
|
||||
textSources: TextSourcesList = emptyList(),
|
||||
title: String? = this.title
|
||||
): InputMediaAudio = TelegramMediaAudio(
|
||||
fileId,
|
||||
textSources,
|
||||
duration,
|
||||
performer,
|
||||
title,
|
||||
thumb ?.fileId
|
||||
)
|
@ -1,53 +0,0 @@
|
||||
package dev.inmo.tgbotapi.types.InputMedia
|
||||
|
||||
import dev.inmo.tgbotapi.requests.abstracts.InputFile
|
||||
import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList
|
||||
import dev.inmo.tgbotapi.types.message.toRawMessageEntities
|
||||
import dev.inmo.tgbotapi.types.message.ParseMode
|
||||
import dev.inmo.tgbotapi.types.files.DocumentFile
|
||||
import dev.inmo.tgbotapi.types.media.TelegramMediaDocument
|
||||
import dev.inmo.tgbotapi.utils.extensions.makeString
|
||||
|
||||
@Deprecated("Replaced and renamed", ReplaceWith("TelegramMediaDocument", "dev.inmo.tgbotapi.types.media.TelegramMediaDocument"))
|
||||
fun InputMediaDocument(
|
||||
file: InputFile,
|
||||
text: String? = null,
|
||||
parseMode: ParseMode? = null,
|
||||
thumb: InputFile? = null,
|
||||
disableContentTypeDetection: Boolean? = null
|
||||
) = TelegramMediaDocument(file, text, parseMode, null, thumb, disableContentTypeDetection)
|
||||
|
||||
@Deprecated("Replaced and renamed", ReplaceWith("TelegramMediaDocument", "dev.inmo.tgbotapi.types.media.TelegramMediaDocument"))
|
||||
fun InputMediaDocument(
|
||||
file: InputFile,
|
||||
entities: TextSourcesList,
|
||||
thumb: InputFile? = null,
|
||||
disableContentTypeDetection: Boolean? = null
|
||||
) = TelegramMediaDocument(
|
||||
file,
|
||||
entities.makeString(),
|
||||
null,
|
||||
entities.toRawMessageEntities(),
|
||||
thumb,
|
||||
disableContentTypeDetection
|
||||
)
|
||||
|
||||
@Deprecated("Replaced and renamed", ReplaceWith("TelegramMediaDocument", "dev.inmo.tgbotapi.types.media.TelegramMediaDocument"))
|
||||
fun DocumentFile.toInputMediaDocument(
|
||||
text: String? = null,
|
||||
parseMode: ParseMode? = null
|
||||
) = TelegramMediaDocument(
|
||||
fileId,
|
||||
text,
|
||||
parseMode,
|
||||
thumb ?.fileId
|
||||
)
|
||||
|
||||
@Deprecated("Replaced and renamed", ReplaceWith("TelegramMediaDocument", "dev.inmo.tgbotapi.types.media.TelegramMediaDocument"))
|
||||
fun DocumentFile.toInputMediaDocument(
|
||||
textSources: TextSourcesList = emptyList()
|
||||
) = TelegramMediaDocument(
|
||||
fileId,
|
||||
textSources,
|
||||
thumb ?.fileId
|
||||
)
|
@ -1,40 +0,0 @@
|
||||
package dev.inmo.tgbotapi.types.InputMedia
|
||||
|
||||
import dev.inmo.tgbotapi.requests.abstracts.InputFile
|
||||
import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList
|
||||
import dev.inmo.tgbotapi.types.message.toRawMessageEntities
|
||||
import dev.inmo.tgbotapi.types.message.ParseMode
|
||||
import dev.inmo.tgbotapi.types.files.PhotoSize
|
||||
import dev.inmo.tgbotapi.types.media.TelegramMediaPhoto
|
||||
import dev.inmo.tgbotapi.utils.extensions.makeString
|
||||
|
||||
@Deprecated("Replaced and renamed", ReplaceWith("TelegramMediaPhoto", "dev.inmo.tgbotapi.types.media.TelegramMediaPhoto"))
|
||||
fun InputMediaPhoto(
|
||||
file: InputFile,
|
||||
text: String? = null,
|
||||
parseMode: ParseMode? = null
|
||||
) = TelegramMediaPhoto(file, text, parseMode, null)
|
||||
|
||||
@Deprecated("Replaced and renamed", ReplaceWith("TelegramMediaPhoto", "dev.inmo.tgbotapi.types.media.TelegramMediaPhoto"))
|
||||
fun InputMediaPhoto(
|
||||
file: InputFile,
|
||||
entities: TextSourcesList
|
||||
) = TelegramMediaPhoto(file, entities.makeString(), null, entities.toRawMessageEntities())
|
||||
|
||||
@Deprecated("Replaced and renamed", ReplaceWith("TelegramMediaPhoto", "dev.inmo.tgbotapi.types.media.TelegramMediaPhoto"))
|
||||
fun PhotoSize.toInputMediaPhoto(
|
||||
text: String? = null,
|
||||
parseMode: ParseMode? = null
|
||||
): InputMediaPhoto = TelegramMediaPhoto(
|
||||
fileId,
|
||||
text,
|
||||
parseMode
|
||||
)
|
||||
|
||||
@Deprecated("Replaced and renamed", ReplaceWith("TelegramMediaPhoto", "dev.inmo.tgbotapi.types.media.TelegramMediaPhoto"))
|
||||
fun PhotoSize.toInputMediaPhoto(
|
||||
textSources: TextSourcesList = emptyList()
|
||||
): InputMediaPhoto = TelegramMediaPhoto(
|
||||
fileId,
|
||||
textSources
|
||||
)
|
@ -1,28 +0,0 @@
|
||||
package dev.inmo.tgbotapi.types.InputMedia
|
||||
|
||||
import dev.inmo.tgbotapi.requests.abstracts.InputFile
|
||||
import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList
|
||||
import dev.inmo.tgbotapi.types.message.toRawMessageEntities
|
||||
import dev.inmo.tgbotapi.types.message.ParseMode
|
||||
import dev.inmo.tgbotapi.types.media.TelegramMediaVideo
|
||||
import dev.inmo.tgbotapi.utils.extensions.makeString
|
||||
|
||||
@Deprecated("Replaced and renamed", ReplaceWith("TelegramMediaVideo", "dev.inmo.tgbotapi.types.media.TelegramMediaVideo"))
|
||||
fun InputMediaVideo(
|
||||
file: InputFile,
|
||||
text: String? = null,
|
||||
parseMode: ParseMode? = null,
|
||||
width: Int? = null,
|
||||
height: Int? = null,
|
||||
duration: Long? = null,
|
||||
thumb: InputFile? = null
|
||||
) = TelegramMediaVideo(file, text, parseMode, null, width, height, duration, thumb)
|
||||
|
||||
fun InputMediaVideo(
|
||||
file: InputFile,
|
||||
entities: TextSourcesList,
|
||||
width: Int? = null,
|
||||
height: Int? = null,
|
||||
duration: Long? = null,
|
||||
thumb: InputFile? = null
|
||||
) = TelegramMediaVideo(file, entities.makeString(), null, entities.toRawMessageEntities(), width, height, duration, thumb)
|
@ -1,34 +0,0 @@
|
||||
package dev.inmo.tgbotapi.types.InputMedia
|
||||
|
||||
@Deprecated("Replaced and renamed", ReplaceWith("DuratedInputMedia", "dev.inmo.tgbotapi.types.media.DuratedInputMedia"))
|
||||
typealias DuratedInputMedia = dev.inmo.tgbotapi.types.media.DuratedTelegramMedia
|
||||
@Deprecated("Replaced and renamed", ReplaceWith("InputMedia", "dev.inmo.tgbotapi.types.media.InputMedia"))
|
||||
typealias InputMedia = dev.inmo.tgbotapi.types.media.TelegramMedia
|
||||
@Deprecated("Replaced and renamed", ReplaceWith("InputMediaAnimation", "dev.inmo.tgbotapi.types.media.InputMediaAnimation"))
|
||||
typealias InputMediaAnimation = dev.inmo.tgbotapi.types.media.TelegramMediaAnimation
|
||||
@Deprecated("Replaced and renamed", ReplaceWith("InputMediaAudio", "dev.inmo.tgbotapi.types.media.InputMediaAudio"))
|
||||
typealias InputMediaAudio = dev.inmo.tgbotapi.types.media.TelegramMediaAudio
|
||||
@Deprecated("Replaced and renamed", ReplaceWith("InputMediaDocument", "dev.inmo.tgbotapi.types.media.InputMediaDocument"))
|
||||
typealias InputMediaDocument = dev.inmo.tgbotapi.types.media.TelegramMediaDocument
|
||||
@Deprecated("Replaced and renamed", ReplaceWith("InputMediaPhoto", "dev.inmo.tgbotapi.types.media.InputMediaPhoto"))
|
||||
typealias InputMediaPhoto = dev.inmo.tgbotapi.types.media.TelegramMediaPhoto
|
||||
@Deprecated("Replaced and renamed", ReplaceWith("InputMediaSerializer", "dev.inmo.tgbotapi.types.media.InputMediaSerializer"))
|
||||
typealias InputMediaSerializer = dev.inmo.tgbotapi.types.media.TelegramMediaSerializer
|
||||
@Deprecated("Replaced and renamed", ReplaceWith("InputMediaVideo", "dev.inmo.tgbotapi.types.media.InputMediaVideo"))
|
||||
typealias InputMediaVideo = dev.inmo.tgbotapi.types.media.TelegramMediaVideo
|
||||
@Deprecated("Replaced and renamed", ReplaceWith("MediaGroupMemberInputMedia", "dev.inmo.tgbotapi.types.media.MediaGroupMemberInputMedia"))
|
||||
typealias MediaGroupMemberInputMedia = dev.inmo.tgbotapi.types.media.MediaGroupMemberTelegramMedia
|
||||
@Deprecated("Replaced and renamed", ReplaceWith("AudioMediaGroupMemberInputMedia", "dev.inmo.tgbotapi.types.media.AudioMediaGroupMemberInputMedia"))
|
||||
typealias AudioMediaGroupMemberInputMedia = dev.inmo.tgbotapi.types.media.AudioMediaGroupMemberTelegramMedia
|
||||
@Deprecated("Replaced and renamed", ReplaceWith("DocumentMediaGroupMemberInputMedia", "dev.inmo.tgbotapi.types.media.DocumentMediaGroupMemberInputMedia"))
|
||||
typealias DocumentMediaGroupMemberInputMedia = dev.inmo.tgbotapi.types.media.DocumentMediaGroupMemberTelegramMedia
|
||||
@Deprecated("Replaced and renamed", ReplaceWith("VisualMediaGroupMemberInputMedia", "dev.inmo.tgbotapi.types.media.VisualMediaGroupMemberInputMedia"))
|
||||
typealias VisualMediaGroupMemberInputMedia = dev.inmo.tgbotapi.types.media.VisualMediaGroupMemberTelegramMedia
|
||||
@Deprecated("Replaced and renamed", ReplaceWith("MediaGroupMemberInputMediaSerializer", "dev.inmo.tgbotapi.types.media.MediaGroupMemberInputMediaSerializer"))
|
||||
typealias MediaGroupMemberInputMediaSerializer = dev.inmo.tgbotapi.types.media.MediaGroupMemberTelegramMediaSerializer
|
||||
@Deprecated("Replaced and renamed", ReplaceWith("ThumbedInputMedia", "dev.inmo.tgbotapi.types.media.ThumbedInputMedia"))
|
||||
typealias ThumbedInputMedia = dev.inmo.tgbotapi.types.media.ThumbedTelegramMedia
|
||||
@Deprecated("Replaced and renamed", ReplaceWith("SizedInputMedia", "dev.inmo.tgbotapi.types.media.SizedInputMedia"))
|
||||
typealias SizedInputMedia = dev.inmo.tgbotapi.types.media.SizedTelegramMedia
|
||||
@Deprecated("Replaced and renamed", ReplaceWith("TitledInputMedia", "dev.inmo.tgbotapi.types.media.TitledInputMedia"))
|
||||
typealias TitledInputMedia = dev.inmo.tgbotapi.types.media.TitledTelegramMedia
|
@ -1,8 +0,0 @@
|
||||
package dev.inmo.tgbotapi.types.MessageEntity
|
||||
|
||||
@Deprecated("Redundant and will be removed soon")
|
||||
fun String.removeLeading(word: String) = if (startsWith(word)) {
|
||||
substring(word.length)
|
||||
} else {
|
||||
this
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
package dev.inmo.tgbotapi.types.MessageEntity.textsources
|
||||
|
||||
/**
|
||||
* @see bold
|
||||
*/
|
||||
@Deprecated("Replaced", ReplaceWith("BoldTextSource", "dev.inmo.tgbotapi.types.message.textsources.BoldTextSource"))
|
||||
typealias BoldTextSource = dev.inmo.tgbotapi.types.message.textsources.BoldTextSource
|
||||
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
@Deprecated("Replaced", ReplaceWith("bold", "dev.inmo.tgbotapi.types.message.textsources.bold"))
|
||||
inline fun bold(parts: TextSourcesList) = dev.inmo.tgbotapi.types.message.textsources.bold(parts)
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
@Deprecated("Replaced", ReplaceWith("bold", "dev.inmo.tgbotapi.types.message.textsources.bold"))
|
||||
inline fun bold(vararg parts: TextSource) = dev.inmo.tgbotapi.types.message.textsources.bold(*parts)
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
@Deprecated("Replaced", ReplaceWith("bold", "dev.inmo.tgbotapi.types.message.textsources.bold"))
|
||||
inline fun bold(text: String) = dev.inmo.tgbotapi.types.message.textsources.bold(text)
|
@ -1,16 +0,0 @@
|
||||
package dev.inmo.tgbotapi.types.MessageEntity.textsources
|
||||
|
||||
private val commandRegex = Regex("[/!][^@\\s]*")
|
||||
|
||||
/**
|
||||
* @see botCommand
|
||||
*/
|
||||
@Deprecated("Replaced", ReplaceWith("BotCommandTextSource", "dev.inmo.tgbotapi.types.message.textsources.BotCommandTextSource"))
|
||||
typealias BotCommandTextSource = dev.inmo.tgbotapi.types.message.textsources.BotCommandTextSource
|
||||
|
||||
/**
|
||||
* @param command Without leading "/"
|
||||
*/
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
@Deprecated("Replaced", ReplaceWith("botCommand", "dev.inmo.tgbotapi.types.message.textsources.botCommand"))
|
||||
inline fun botCommand(command: String) = dev.inmo.tgbotapi.types.message.textsources.botCommand(command)
|
@ -1,17 +0,0 @@
|
||||
package dev.inmo.tgbotapi.types.MessageEntity.textsources
|
||||
|
||||
/**
|
||||
* @see cashTag
|
||||
*/
|
||||
@Deprecated("Replaced", ReplaceWith("CashTagTextSource", "dev.inmo.tgbotapi.types.message.textsources.CashTagTextSource"))
|
||||
typealias CashTagTextSource = dev.inmo.tgbotapi.types.message.textsources.CashTagTextSource
|
||||
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
@Deprecated("Replaced", ReplaceWith("cashTag", "dev.inmo.tgbotapi.types.message.textsources.cashTag"))
|
||||
inline fun cashTag(parts: TextSourcesList) = dev.inmo.tgbotapi.types.message.textsources.cashTag(parts)
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
@Deprecated("Replaced", ReplaceWith("cashTag", "dev.inmo.tgbotapi.types.message.textsources.cashTag"))
|
||||
inline fun cashTag(vararg parts: TextSource) = dev.inmo.tgbotapi.types.message.textsources.cashTag(*parts)
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
@Deprecated("Replaced", ReplaceWith("cashTag", "dev.inmo.tgbotapi.types.message.textsources.cashTag"))
|
||||
inline fun cashTag(tag: String) = dev.inmo.tgbotapi.types.message.textsources.cashTag(tag)
|
@ -1,13 +0,0 @@
|
||||
package dev.inmo.tgbotapi.types.MessageEntity.textsources
|
||||
|
||||
import dev.inmo.tgbotapi.utils.internal.code
|
||||
|
||||
/**
|
||||
* @see code
|
||||
*/
|
||||
@Deprecated("Replaced", ReplaceWith("CodeTextSource", "dev.inmo.tgbotapi.types.message.textsources.CodeTextSource"))
|
||||
typealias CodeTextSource = dev.inmo.tgbotapi.types.message.textsources.CodeTextSource
|
||||
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
@Deprecated("Replaced", ReplaceWith("code", "dev.inmo.tgbotapi.types.message.textsources.code"))
|
||||
inline fun code(code: String) = dev.inmo.tgbotapi.types.message.textsources.code(code)
|
@ -1,17 +0,0 @@
|
||||
package dev.inmo.tgbotapi.types.MessageEntity.textsources
|
||||
|
||||
/**
|
||||
* @see email
|
||||
*/
|
||||
@Deprecated("Replaced", ReplaceWith("EMailTextSource", "dev.inmo.tgbotapi.types.message.textsources.EMailTextSource"))
|
||||
typealias EMailTextSource = dev.inmo.tgbotapi.types.message.textsources.EMailTextSource
|
||||
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
@Deprecated("Replaced", ReplaceWith("email", "dev.inmo.tgbotapi.types.message.textsources.email"))
|
||||
inline fun email(parts: TextSourcesList) = dev.inmo.tgbotapi.types.message.textsources.email(parts)
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
@Deprecated("Replaced", ReplaceWith("email", "dev.inmo.tgbotapi.types.message.textsources.email"))
|
||||
inline fun email(vararg parts: TextSource) = dev.inmo.tgbotapi.types.message.textsources.email(*parts)
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
@Deprecated("Replaced", ReplaceWith("email", "dev.inmo.tgbotapi.types.message.textsources.email"))
|
||||
inline fun email(emailAddress: String) = dev.inmo.tgbotapi.types.message.textsources.email(emailAddress)
|
@ -1,20 +0,0 @@
|
||||
package dev.inmo.tgbotapi.types.MessageEntity.textsources
|
||||
|
||||
/**
|
||||
* @see hashtag
|
||||
*/
|
||||
@Deprecated("Replaced", ReplaceWith("HashTagTextSource", "dev.inmo.tgbotapi.types.message.textsources.HashTagTextSource"))
|
||||
typealias HashTagTextSource = dev.inmo.tgbotapi.types.message.textsources.HashTagTextSource
|
||||
|
||||
@Suppress("NOTHING_TO_INLINE", "EXPERIMENTAL_API_USAGE")
|
||||
@Deprecated("Replaced", ReplaceWith("hashtag", "dev.inmo.tgbotapi.types.message.textsources.hashtag"))
|
||||
inline fun hashtag(parts: TextSourcesList) = dev.inmo.tgbotapi.types.message.textsources.hashtag(parts)
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
@Deprecated("Replaced", ReplaceWith("hashtag", "dev.inmo.tgbotapi.types.message.textsources.hashtag"))
|
||||
inline fun hashtag(vararg parts: TextSource) = dev.inmo.tgbotapi.types.message.textsources.hashtag(*parts)
|
||||
/**
|
||||
* Without sharp (#)
|
||||
*/
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
@Deprecated("Replaced", ReplaceWith("hashtag", "dev.inmo.tgbotapi.types.message.textsources.hashtag"))
|
||||
inline fun hashtag(hashtag: String) = dev.inmo.tgbotapi.types.message.textsources.hashtag(hashtag)
|
@ -1,18 +0,0 @@
|
||||
package dev.inmo.tgbotapi.types.MessageEntity.textsources
|
||||
|
||||
/**
|
||||
* @see italic
|
||||
*/
|
||||
@Deprecated("Replaced", ReplaceWith("ItalicTextSource", "dev.inmo.tgbotapi.types.message.textsources.ItalicTextSource"))
|
||||
typealias ItalicTextSource = dev.inmo.tgbotapi.types.message.textsources.ItalicTextSource
|
||||
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
@Deprecated("Replaced", ReplaceWith("italic", "dev.inmo.tgbotapi.types.message.textsources.italic"))
|
||||
inline fun italic(parts: TextSourcesList) = dev.inmo.tgbotapi.types.message.textsources.italic(parts)
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
@Deprecated("Replaced", ReplaceWith("italic", "dev.inmo.tgbotapi.types.message.textsources.italic"))
|
||||
inline fun italic(vararg parts: TextSource) = dev.inmo.tgbotapi.types.message.textsources.italic(*parts)
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
@Deprecated("Replaced", ReplaceWith("italic", "dev.inmo.tgbotapi.types.message.textsources.italic"))
|
||||
inline fun italic(text: String) = dev.inmo.tgbotapi.types.message.textsources.italic(text)
|
||||
|
@ -1,28 +0,0 @@
|
||||
package dev.inmo.tgbotapi.types.MessageEntity.textsources
|
||||
|
||||
import dev.inmo.tgbotapi.types.Username
|
||||
|
||||
/**
|
||||
* @see mention
|
||||
*/
|
||||
@Deprecated("Replaced", ReplaceWith("MentionTextSource", "dev.inmo.tgbotapi.types.message.textsources.MentionTextSource"))
|
||||
typealias MentionTextSource = dev.inmo.tgbotapi.types.message.textsources.MentionTextSource
|
||||
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
@Deprecated("Replaced", ReplaceWith("mention", "dev.inmo.tgbotapi.types.message.textsources.mention"))
|
||||
inline fun mention(parts: TextSourcesList) = dev.inmo.tgbotapi.types.message.textsources.mention(parts)
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
@Deprecated("Replaced", ReplaceWith("mention", "dev.inmo.tgbotapi.types.message.textsources.mention"))
|
||||
inline fun mention(vararg parts: TextSource) = dev.inmo.tgbotapi.types.message.textsources.mention(*parts)
|
||||
|
||||
/**
|
||||
* Without leading "@"
|
||||
*/
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
@Deprecated("Replaced", ReplaceWith("mention", "dev.inmo.tgbotapi.types.message.textsources.mention"))
|
||||
inline fun mention(whoToMention: String) = dev.inmo.tgbotapi.types.message.textsources.mention(whoToMention)
|
||||
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
@Deprecated("Replaced", ReplaceWith("mention", "dev.inmo.tgbotapi.types.message.textsources.mention"))
|
||||
inline fun mention(whoToMention: Username) = dev.inmo.tgbotapi.types.message.textsources.mention(whoToMention)
|
||||
|
@ -1,18 +0,0 @@
|
||||
package dev.inmo.tgbotapi.types.MessageEntity.textsources
|
||||
|
||||
/**
|
||||
* @see phone
|
||||
*/
|
||||
@Deprecated("Replaced", ReplaceWith("PhoneNumberTextSource", "dev.inmo.tgbotapi.types.message.textsources.PhoneNumberTextSource"))
|
||||
typealias PhoneNumberTextSource = dev.inmo.tgbotapi.types.message.textsources.PhoneNumberTextSource
|
||||
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
@Deprecated("Replaced", ReplaceWith("phone", "dev.inmo.tgbotapi.types.message.textsources.phone"))
|
||||
inline fun phone(parts: TextSourcesList) = dev.inmo.tgbotapi.types.message.textsources.phone(parts)
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
@Deprecated("Replaced", ReplaceWith("phone", "dev.inmo.tgbotapi.types.message.textsources.phone"))
|
||||
inline fun phone(vararg parts: TextSource) = dev.inmo.tgbotapi.types.message.textsources.phone(*parts)
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
@Deprecated("Replaced", ReplaceWith("phone", "dev.inmo.tgbotapi.types.message.textsources.phone"))
|
||||
inline fun phone(number: String) = dev.inmo.tgbotapi.types.message.textsources.phone(number)
|
||||
|
@ -1,12 +0,0 @@
|
||||
package dev.inmo.tgbotapi.types.MessageEntity.textsources
|
||||
|
||||
/**
|
||||
* @see pre
|
||||
*/
|
||||
@Deprecated("Replaced", ReplaceWith("PreTextSource", "dev.inmo.tgbotapi.types.message.textsources.PreTextSource"))
|
||||
typealias PreTextSource = dev.inmo.tgbotapi.types.message.textsources.PreTextSource
|
||||
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
@Deprecated("Replaced", ReplaceWith("pre", "dev.inmo.tgbotapi.types.message.textsources.pre"))
|
||||
inline fun pre(code: String, language: String? = null) = dev.inmo.tgbotapi.types.message.textsources.pre(code, language)
|
||||
|
@ -1,11 +0,0 @@
|
||||
package dev.inmo.tgbotapi.types.MessageEntity.textsources
|
||||
|
||||
/**
|
||||
* @see regular
|
||||
*/
|
||||
@Deprecated("Replaced", ReplaceWith("RegularTextSource", "dev.inmo.tgbotapi.types.message.textsources.RegularTextSource"))
|
||||
typealias RegularTextSource = dev.inmo.tgbotapi.types.message.textsources.RegularTextSource
|
||||
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
@Deprecated("Replaced", ReplaceWith("regular", "dev.inmo.tgbotapi.types.message.textsources.regular"))
|
||||
inline fun regular(text: String) = dev.inmo.tgbotapi.types.message.textsources.regular(text)
|
@ -1,18 +0,0 @@
|
||||
package dev.inmo.tgbotapi.types.MessageEntity.textsources
|
||||
|
||||
/**
|
||||
* @see italic
|
||||
*/
|
||||
@Deprecated("Replaced", ReplaceWith("SpoilerTextSource", "dev.inmo.tgbotapi.types.message.textsources.SpoilerTextSource"))
|
||||
typealias SpoilerTextSource = dev.inmo.tgbotapi.types.message.textsources.SpoilerTextSource
|
||||
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
@Deprecated("Replaced", ReplaceWith("spoiler", "dev.inmo.tgbotapi.types.message.textsources.spoiler"))
|
||||
inline fun spoiler(parts: TextSourcesList) = dev.inmo.tgbotapi.types.message.textsources.spoiler(parts)
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
@Deprecated("Replaced", ReplaceWith("spoiler", "dev.inmo.tgbotapi.types.message.textsources.spoiler"))
|
||||
inline fun spoiler(vararg parts: TextSource) = dev.inmo.tgbotapi.types.message.textsources.spoiler(*parts)
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
@Deprecated("Replaced", ReplaceWith("spoiler", "dev.inmo.tgbotapi.types.message.textsources.spoiler"))
|
||||
inline fun spoiler(text: String) = dev.inmo.tgbotapi.types.message.textsources.spoiler(text)
|
||||
|
@ -1,17 +0,0 @@
|
||||
package dev.inmo.tgbotapi.types.MessageEntity.textsources
|
||||
|
||||
/**
|
||||
* @see strikethrough
|
||||
*/
|
||||
@Deprecated("Replaced", ReplaceWith("StrikethroughTextSource", "dev.inmo.tgbotapi.types.message.textsources.StrikethroughTextSource"))
|
||||
typealias StrikethroughTextSource = dev.inmo.tgbotapi.types.message.textsources.StrikethroughTextSource
|
||||
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
@Deprecated("Replaced", ReplaceWith("strikethrough", "dev.inmo.tgbotapi.types.message.textsources.strikethrough"))
|
||||
inline fun strikethrough(parts: TextSourcesList) = dev.inmo.tgbotapi.types.message.textsources.strikethrough(parts)
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
@Deprecated("Replaced", ReplaceWith("strikethrough", "dev.inmo.tgbotapi.types.message.textsources.strikethrough"))
|
||||
inline fun strikethrough(vararg parts: TextSource) = dev.inmo.tgbotapi.types.message.textsources.strikethrough(*parts)
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
@Deprecated("Replaced", ReplaceWith("strikethrough", "dev.inmo.tgbotapi.types.message.textsources.strikethrough"))
|
||||
inline fun strikethrough(text: String) = dev.inmo.tgbotapi.types.message.textsources.strikethrough(text)
|
@ -1,13 +0,0 @@
|
||||
package dev.inmo.tgbotapi.types.MessageEntity.textsources
|
||||
|
||||
import dev.inmo.tgbotapi.utils.internal.link
|
||||
|
||||
/**
|
||||
* @see link
|
||||
*/
|
||||
@Deprecated("Replaced", ReplaceWith("TextLinkTextSource", "dev.inmo.tgbotapi.types.message.textsources.TextLinkTextSource"))
|
||||
typealias TextLinkTextSource = dev.inmo.tgbotapi.types.message.textsources.TextLinkTextSource
|
||||
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
@Deprecated("Replaced", ReplaceWith("link", "dev.inmo.tgbotapi.types.message.textsources.link"))
|
||||
inline fun link(text: String, url: String) = dev.inmo.tgbotapi.types.message.textsources.link(text, url)
|
@ -1,51 +0,0 @@
|
||||
package dev.inmo.tgbotapi.types.MessageEntity.textsources
|
||||
|
||||
import dev.inmo.tgbotapi.types.Identifier
|
||||
import dev.inmo.tgbotapi.types.UserId
|
||||
import dev.inmo.tgbotapi.types.chat.User
|
||||
import dev.inmo.tgbotapi.types.message.textsources.mention
|
||||
|
||||
/**
|
||||
* @see mention
|
||||
*/
|
||||
@Deprecated("Replaced", ReplaceWith("TextMentionTextSource", "dev.inmo.tgbotapi.types.message.textsources.TextMentionTextSource"))
|
||||
typealias TextMentionTextSource = dev.inmo.tgbotapi.types.message.textsources.TextMentionTextSource
|
||||
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
@Deprecated("Replaced", ReplaceWith("mention", "dev.inmo.tgbotapi.types.message.textsources.mention"))
|
||||
inline fun mention(parts: TextSourcesList, user: User) = mention(parts, user)
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
@Deprecated("Replaced", ReplaceWith("User.mention", "dev.inmo.tgbotapi.types.message.textsources.User.mention"))
|
||||
inline fun User.mention(parts: TextSourcesList) = mention(parts)
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
@Deprecated("Replaced", ReplaceWith("mention", "dev.inmo.tgbotapi.types.message.textsources.mention"))
|
||||
inline fun mention(parts: TextSourcesList, userId: UserId) = mention(parts, userId)
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
@Deprecated("Replaced", ReplaceWith("UserId.mention", "dev.inmo.tgbotapi.types.message.textsources.UserId.mention"))
|
||||
inline fun UserId.mention(parts: TextSourcesList) = mention(parts)
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
@Deprecated("Replaced", ReplaceWith("mention", "dev.inmo.tgbotapi.types.message.textsources.mention"))
|
||||
inline fun mention(parts: TextSourcesList, id: Identifier) = mention(parts, id)
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
@Deprecated("Replaced", ReplaceWith("Identifier.mention", "dev.inmo.tgbotapi.types.message.textsources.Identifier.mention"))
|
||||
inline fun Identifier.mention(parts: TextSourcesList) = mention(parts)
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
inline fun mention(user: User, vararg parts: TextSource) = mention(user, *parts)
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
@Deprecated("Replaced", ReplaceWith("mention", "dev.inmo.tgbotapi.types.message.textsources.mention"))
|
||||
inline fun mention(text: String, user: User) = mention(text, user)
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
@Deprecated("Replaced", ReplaceWith("User.mention", "dev.inmo.tgbotapi.types.message.textsources.User.mention"))
|
||||
inline fun User.mention(text: String) = mention(text)
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
@Deprecated("Replaced", ReplaceWith("mention", "dev.inmo.tgbotapi.types.message.textsources.mention"))
|
||||
inline fun mention(text: String, userId: UserId) = mention(text, userId)
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
@Deprecated("Replaced", ReplaceWith("UserId.mention", "dev.inmo.tgbotapi.types.message.textsources.UserId.mention"))
|
||||
inline fun UserId.mention(text: String) = mention(text)
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
@Deprecated("Replaced", ReplaceWith("mention", "dev.inmo.tgbotapi.types.message.textsources.mention"))
|
||||
inline fun mention(text: String, id: Identifier) = mention(text, id)
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
@Deprecated("Replaced", ReplaceWith("Identifier.mention", "dev.inmo.tgbotapi.types.message.textsources.Identifier.mention"))
|
||||
inline fun Identifier.mention(text: String) = mention(text)
|
@ -1,50 +0,0 @@
|
||||
package dev.inmo.tgbotapi.types.MessageEntity.textsources
|
||||
|
||||
import dev.inmo.tgbotapi.types.captionLength
|
||||
import dev.inmo.tgbotapi.types.message.textsources.separateForCaption
|
||||
import dev.inmo.tgbotapi.types.message.textsources.separateForMessage
|
||||
import dev.inmo.tgbotapi.types.message.textsources.separateForText
|
||||
import dev.inmo.tgbotapi.types.textLength
|
||||
|
||||
const val DirectInvocationOfTextSourceConstructor = "It is strongly not recommended to use constructors directly instead of factory methods"
|
||||
|
||||
@Deprecated("Replaced", ReplaceWith("TextSourcesList", "dev.inmo.tgbotapi.types.message.textsources.TextSourcesList"))
|
||||
typealias TextSourcesList = dev.inmo.tgbotapi.types.message.textsources.TextSourcesList
|
||||
@Deprecated("Replaced", ReplaceWith("MutableTextSourcesList", "dev.inmo.tgbotapi.types.message.textsources.MutableTextSourcesList"))
|
||||
typealias MutableTextSourcesList = dev.inmo.tgbotapi.types.message.textsources.MutableTextSourcesList
|
||||
|
||||
@Deprecated("Replaced", ReplaceWith("TextSource", "dev.inmo.tgbotapi.types.message.textsources.TextSource"))
|
||||
typealias TextSource = dev.inmo.tgbotapi.types.message.textsources.TextSource
|
||||
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
@Deprecated("Replaced", ReplaceWith("plus", "dev.inmo.tgbotapi.types.message.textsources.plus"))
|
||||
inline operator fun TextSource.plus(other: TextSource) = listOf(this, other)
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
@Deprecated("Replaced", ReplaceWith("plus", "dev.inmo.tgbotapi.types.message.textsources.plus"))
|
||||
inline operator fun TextSource.plus(other: List<TextSource>) = listOf(this) + other
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
@Deprecated("Replaced", ReplaceWith("plus", "dev.inmo.tgbotapi.types.message.textsources.plus"))
|
||||
inline operator fun TextSource.plus(text: String) = listOf(this, regular(text))
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
@Deprecated("Replaced", ReplaceWith("plus", "dev.inmo.tgbotapi.types.message.textsources.plus"))
|
||||
inline operator fun List<TextSource>.plus(text: String) = this + regular(text)
|
||||
|
||||
@Deprecated("Replaced", ReplaceWith("MultilevelTextSource", "dev.inmo.tgbotapi.types.message.textsources.MultilevelTextSource"))
|
||||
typealias MultilevelTextSource = dev.inmo.tgbotapi.types.message.textsources.MultilevelTextSource
|
||||
|
||||
@Deprecated("Replaced", ReplaceWith("separateForMessage", "dev.inmo.tgbotapi.types.message.textsources.separateForMessage"))
|
||||
inline fun List<TextSource>.separateForMessage(limit: IntRange, numberOfParts: Int? = null) = separateForMessage(limit, numberOfParts)
|
||||
|
||||
/**
|
||||
* This method will prepare [TextSource]s list for messages. Remember, that first part will be separated with
|
||||
* [captionLength] and all others with
|
||||
*/
|
||||
@Deprecated("Replaced", ReplaceWith("separateForCaption", "dev.inmo.tgbotapi.types.message.textsources.separateForCaption"))
|
||||
fun List<TextSource>.separateForCaption() = separateForCaption()
|
||||
|
||||
/**
|
||||
* This method will prepare [TextSource]s list for messages with [textLength]
|
||||
*/
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
@Deprecated("Replaced", ReplaceWith("separateForText", "dev.inmo.tgbotapi.types.message.textsources.separateForText"))
|
||||
inline fun List<TextSource>.separateForText() = separateForText()
|
@ -1,5 +0,0 @@
|
||||
package dev.inmo.tgbotapi.types.MessageEntity.textsources
|
||||
|
||||
import dev.inmo.tgbotapi.types.message.textsources.TextSourceSerializer
|
||||
|
||||
val TextSourceSerializer = TextSourceSerializer
|
@ -1,15 +0,0 @@
|
||||
package dev.inmo.tgbotapi.types.MessageEntity.textsources
|
||||
|
||||
import dev.inmo.tgbotapi.utils.RiskFeature
|
||||
|
||||
@RiskFeature
|
||||
inline fun textSourcesOrElse(
|
||||
textSources: TextSourcesList,
|
||||
block: () -> TextSourcesList
|
||||
) = dev.inmo.tgbotapi.types.message.textsources.textSourcesOrElse(textSources, block)
|
||||
|
||||
@RiskFeature
|
||||
inline fun textSourcesOrElseTextSource(
|
||||
textSources: TextSourcesList,
|
||||
block: () -> TextSource
|
||||
) = dev.inmo.tgbotapi.types.message.textsources.textSourcesOrElseTextSource(textSources, block)
|
@ -1,13 +0,0 @@
|
||||
package dev.inmo.tgbotapi.types.MessageEntity.textsources
|
||||
|
||||
import dev.inmo.tgbotapi.utils.internal.link
|
||||
|
||||
/**
|
||||
* @see link
|
||||
*/
|
||||
@Deprecated("Replaced", ReplaceWith("URLTextSource", "dev.inmo.tgbotapi.types.message.textsources.URLTextSource"))
|
||||
typealias URLTextSource = dev.inmo.tgbotapi.types.message.textsources.URLTextSource
|
||||
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
@Deprecated("Replaced", ReplaceWith("link", "dev.inmo.tgbotapi.types.message.textsources.link"))
|
||||
inline fun link(url: String) = dev.inmo.tgbotapi.types.message.textsources.link(url)
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user