All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.dsl.SwitchInlineQueryCurrentChatButtonsBuilder.kt Maven / Gradle / Ivy

package dev.inmo.tgbotapi.keyboards.lib.dsl

import dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContext
import dev.inmo.tgbotapi.extensions.behaviour_builder.CustomBehaviourContextAndTypeReceiver
import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.SimpleFilter
import dev.inmo.tgbotapi.keyboards.lib.KeyboardBuilder
import dev.inmo.tgbotapi.keyboards.lib.KeyboardMenu
import dev.inmo.tgbotapi.types.InlineQueries.query.BaseInlineQuery
import dev.inmo.tgbotapi.types.InlineQueries.query.InlineQuery
import dev.inmo.tgbotapi.types.LoginURL
import dev.inmo.tgbotapi.types.queries.callback.DataCallbackQuery
import dev.inmo.tgbotapi.utils.RowBuilder

fun  RowBuilder>.switchInlineQueryCurrentChat(
    textBuilder: suspend BC.() -> String,
    initialInlineQueryBuilder: suspend BC.() -> String
) = +KeyboardBuilder.Button.SwitchInlineQueryCurrentChat(
    textBuilder = textBuilder,
    initialInlineQueryBuilder = initialInlineQueryBuilder
)


fun  RowBuilder>.switchInlineQueryCurrentChat(
    textBuilder: suspend BC.() -> String,
    initialInlineQueryBuilder: String,
) = switchInlineQueryCurrentChat(
    textBuilder = textBuilder,
    initialInlineQueryBuilder = { initialInlineQueryBuilder }
)


fun  RowBuilder>.switchInlineQueryCurrentChat(
    text: String,
    initialInlineQueryBuilder: suspend BC.() -> String
) = switchInlineQueryCurrentChat(
    textBuilder = { text },
    initialInlineQueryBuilder = initialInlineQueryBuilder
)


fun  RowBuilder>.switchInlineQueryCurrentChat(
    text: String,
    switchInlineQueryCurrentChat: String
) = switchInlineQueryCurrentChat({ text }) { switchInlineQueryCurrentChat }


fun  RowBuilder>.switchInlineQueryCurrentChat(
    textBuilder: suspend BC.() -> String,
    initialInlineQueryBuilder: suspend BC.() -> String,
    initialFilter: SimpleFilter? = null,
    onBaseInlineQueryCallback: CustomBehaviourContextAndTypeReceiver
) = +KeyboardBuilder.Button.SwitchInlineQueryCurrentChat(
    textBuilder = textBuilder,
    initialInlineQueryBuilder = initialInlineQueryBuilder,
    initialFilter = initialFilter,
    onBaseInlineQueryCallback = onBaseInlineQueryCallback
)


fun  RowBuilder>.switchInlineQueryCurrentChat(
    textBuilder: suspend BC.() -> String,
    initialInlineQueryBuilder: String,
    initialFilter: SimpleFilter? = null,
    onBaseInlineQueryCallback: CustomBehaviourContextAndTypeReceiver
) = switchInlineQueryCurrentChat(
    textBuilder = textBuilder,
    initialInlineQueryBuilder = { initialInlineQueryBuilder },
    initialFilter = initialFilter,
    onBaseInlineQueryCallback = onBaseInlineQueryCallback
)


fun  RowBuilder>.switchInlineQueryCurrentChat(
    text: String,
    initialInlineQueryBuilder: suspend BC.() -> String,
    initialFilter: SimpleFilter? = null,
    onBaseInlineQueryCallback: CustomBehaviourContextAndTypeReceiver
) = switchInlineQueryCurrentChat(
    textBuilder = { text },
    initialInlineQueryBuilder = initialInlineQueryBuilder,
    initialFilter = initialFilter,
    onBaseInlineQueryCallback = onBaseInlineQueryCallback
)


fun  RowBuilder>.switchInlineQueryCurrentChat(
    text: String,
    switchInlineQueryCurrentChat: String,
    initialFilter: SimpleFilter? = null,
    onBaseInlineQueryCallback: CustomBehaviourContextAndTypeReceiver
) = switchInlineQueryCurrentChat(
    { text },
    { switchInlineQueryCurrentChat },
    initialFilter = initialFilter,
    onBaseInlineQueryCallback = onBaseInlineQueryCallback
)




© 2015 - 2024 Weber Informatics LLC | Privacy Policy