1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-06-01 15:35:24 +00:00
tgbotapi/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/utils/extensions/UpdatesFilter.kt

46 lines
1.8 KiB
Kotlin
Raw Normal View History

package com.github.insanusmokrassar.TelegramBotAPI.utils.extensions
import com.github.insanusmokrassar.TelegramBotAPI.types.update.*
2019-05-12 11:15:31 +00:00
import com.github.insanusmokrassar.TelegramBotAPI.types.update.MediaGroupUpdates.MediaGroupUpdate
import com.github.insanusmokrassar.TelegramBotAPI.updateshandlers.UpdatesFilter
@Deprecated(
"Replaced in separated package",
ReplaceWith(
"UpdatesFilter",
"com.github.insanusmokrassar.TelegramBotAPI.updateshandlers.UpdatesFilter"
)
)
typealias UpdatesFilter = UpdatesFilter
@Deprecated(
"Replaced in separated package",
ReplaceWith(
"createSimpleUpdateFilter",
"com.github.insanusmokrassar.TelegramBotAPI.updateshandlers.createSimpleUpdateFilter"
)
)
fun createSimpleUpdateFilter(
messageCallback: UpdateReceiver<MessageUpdate>? = null,
mediaGroupCallback: UpdateReceiver<MediaGroupUpdate>? = null,
editedMessageCallback: UpdateReceiver<EditMessageUpdate>? = null,
channelPostCallback: UpdateReceiver<ChannelPostUpdate>? = null,
editedChannelPostCallback: UpdateReceiver<EditChannelPostUpdate>? = null,
chosenInlineResultCallback: UpdateReceiver<ChosenInlineResultUpdate>? = null,
inlineQueryCallback: UpdateReceiver<InlineQueryUpdate>? = null,
callbackQueryCallback: UpdateReceiver<CallbackQueryUpdate>? = null,
shippingQueryCallback: UpdateReceiver<ShippingQueryUpdate>? = null,
preCheckoutQueryCallback: UpdateReceiver<PreCheckoutQueryUpdate>? = null
): UpdatesFilter = com.github.insanusmokrassar.TelegramBotAPI.updateshandlers.createSimpleUpdateFilter(
messageCallback,
mediaGroupCallback,
editedMessageCallback,
channelPostCallback,
editedChannelPostCallback,
chosenInlineResultCallback,
inlineQueryCallback,
callbackQueryCallback,
shippingQueryCallback,
preCheckoutQueryCallback
)