mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-29 21:48:43 +00:00
Compare commits
2 Commits
479923a04a
...
7d47d0ab61
Author | SHA1 | Date | |
---|---|---|---|
7d47d0ab61 | |||
636c01acb9 |
@ -13211,11 +13211,13 @@ public final class dev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/Callbac
|
|||||||
|
|
||||||
public final class dev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/CopyTextButton : dev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/InlineKeyboardButton {
|
public final class dev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/CopyTextButton : dev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/InlineKeyboardButton {
|
||||||
public static final field Companion Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/CopyTextButton$Companion;
|
public static final field Companion Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/CopyTextButton$Companion;
|
||||||
public fun <init> (Ljava/lang/String;)V
|
public fun <init> (Ljava/lang/String;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/CopyTextButtonData;)V
|
||||||
public final fun component1 ()Ljava/lang/String;
|
public final fun component1 ()Ljava/lang/String;
|
||||||
public final fun copy (Ljava/lang/String;)Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/CopyTextButton;
|
public final fun component2 ()Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/CopyTextButtonData;
|
||||||
public static synthetic fun copy$default (Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/CopyTextButton;Ljava/lang/String;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/CopyTextButton;
|
public final fun copy (Ljava/lang/String;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/CopyTextButtonData;)Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/CopyTextButton;
|
||||||
|
public static synthetic fun copy$default (Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/CopyTextButton;Ljava/lang/String;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/CopyTextButtonData;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/CopyTextButton;
|
||||||
public fun equals (Ljava/lang/Object;)Z
|
public fun equals (Ljava/lang/Object;)Z
|
||||||
|
public final fun getData ()Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/CopyTextButtonData;
|
||||||
public fun getText ()Ljava/lang/String;
|
public fun getText ()Ljava/lang/String;
|
||||||
public fun hashCode ()I
|
public fun hashCode ()I
|
||||||
public fun toString ()Ljava/lang/String;
|
public fun toString ()Ljava/lang/String;
|
||||||
@ -13236,6 +13238,33 @@ public final class dev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/CopyTex
|
|||||||
public final fun serializer ()Lkotlinx/serialization/KSerializer;
|
public final fun serializer ()Lkotlinx/serialization/KSerializer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final class dev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/CopyTextButtonData {
|
||||||
|
public static final field Companion Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/CopyTextButtonData$Companion;
|
||||||
|
public fun <init> (Ljava/lang/String;)V
|
||||||
|
public final fun component1 ()Ljava/lang/String;
|
||||||
|
public final fun copy (Ljava/lang/String;)Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/CopyTextButtonData;
|
||||||
|
public static synthetic fun copy$default (Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/CopyTextButtonData;Ljava/lang/String;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/CopyTextButtonData;
|
||||||
|
public fun equals (Ljava/lang/Object;)Z
|
||||||
|
public final fun getText ()Ljava/lang/String;
|
||||||
|
public fun hashCode ()I
|
||||||
|
public fun toString ()Ljava/lang/String;
|
||||||
|
}
|
||||||
|
|
||||||
|
public synthetic class dev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/CopyTextButtonData$$serializer : kotlinx/serialization/internal/GeneratedSerializer {
|
||||||
|
public static final field INSTANCE Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/CopyTextButtonData$$serializer;
|
||||||
|
public final fun childSerializers ()[Lkotlinx/serialization/KSerializer;
|
||||||
|
public final fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/CopyTextButtonData;
|
||||||
|
public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object;
|
||||||
|
public final fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor;
|
||||||
|
public final fun serialize (Lkotlinx/serialization/encoding/Encoder;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/CopyTextButtonData;)V
|
||||||
|
public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V
|
||||||
|
public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer;
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class dev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/CopyTextButtonData$Companion {
|
||||||
|
public final fun serializer ()Lkotlinx/serialization/KSerializer;
|
||||||
|
}
|
||||||
|
|
||||||
public abstract interface class dev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/InlineKeyboardButton {
|
public abstract interface class dev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/InlineKeyboardButton {
|
||||||
public static final field Companion Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/InlineKeyboardButton$Companion;
|
public static final field Companion Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/InlineKeyboardButton$Companion;
|
||||||
public abstract fun getText ()Ljava/lang/String;
|
public abstract fun getText ()Ljava/lang/String;
|
||||||
@ -14155,7 +14184,8 @@ public final class dev/inmo/tgbotapi/types/buttons/WebAppKeyboardButton$Companio
|
|||||||
}
|
}
|
||||||
|
|
||||||
public final class dev/inmo/tgbotapi/types/buttons/inline/InlineKeyboardButtonsShortcutsKt {
|
public final class dev/inmo/tgbotapi/types/buttons/inline/InlineKeyboardButtonsShortcutsKt {
|
||||||
public static final fun copyTextButton (Ljava/lang/String;)Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/CopyTextButton;
|
public static final fun copyTextButton (Ljava/lang/String;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/CopyTextButtonData;)Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/CopyTextButton;
|
||||||
|
public static final fun copyTextButton (Ljava/lang/String;Ljava/lang/String;)Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/CopyTextButton;
|
||||||
public static final fun dataInlineButton (Ljava/lang/String;Ljava/lang/String;)Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/CallbackDataInlineKeyboardButton;
|
public static final fun dataInlineButton (Ljava/lang/String;Ljava/lang/String;)Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/CallbackDataInlineKeyboardButton;
|
||||||
public static final fun gameInlineButton (Ljava/lang/String;)Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/CallbackGameInlineKeyboardButton;
|
public static final fun gameInlineButton (Ljava/lang/String;)Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/CallbackGameInlineKeyboardButton;
|
||||||
public static final fun inlineQueryInAnyCurrentChatInlineButton (Ljava/lang/String;Ljava/lang/String;)Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/SwitchInlineQueryChosenChatInlineKeyboardButton;
|
public static final fun inlineQueryInAnyCurrentChatInlineButton (Ljava/lang/String;Ljava/lang/String;)Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/SwitchInlineQueryChosenChatInlineKeyboardButton;
|
||||||
|
@ -0,0 +1,8 @@
|
|||||||
|
package dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons
|
||||||
|
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
data class CopyTextButtonData(
|
||||||
|
val text: String,
|
||||||
|
)
|
@ -142,11 +142,13 @@ data class URLInlineKeyboardButton(
|
|||||||
) : InlineKeyboardButton
|
) : InlineKeyboardButton
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Simple [url] button. Can be forwarded in any chat with message in case if it is the only one button in message
|
* `copy_text` button
|
||||||
*/
|
*/
|
||||||
@Serializable
|
@Serializable
|
||||||
data class CopyTextButton(
|
data class CopyTextButton(
|
||||||
override val text: String
|
override val text: String,
|
||||||
|
@SerialName(copyTextField)
|
||||||
|
val data: CopyTextButtonData
|
||||||
) : InlineKeyboardButton
|
) : InlineKeyboardButton
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -37,11 +37,20 @@ inline fun loginInlineButton(
|
|||||||
) = LoginURLInlineKeyboardButton(text, loginUrl)
|
) = LoginURLInlineKeyboardButton(text, loginUrl)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates [LoginURLInlineKeyboardButton]
|
* Creates [CopyTextButton]
|
||||||
*/
|
*/
|
||||||
inline fun copyTextButton(
|
inline fun copyTextButton(
|
||||||
text: String
|
text: String,
|
||||||
) = CopyTextButton(text)
|
data: CopyTextButtonData
|
||||||
|
) = CopyTextButton(text, data)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates [CopyTextButton]
|
||||||
|
*/
|
||||||
|
inline fun copyTextButton(
|
||||||
|
text: String,
|
||||||
|
data: String
|
||||||
|
) = copyTextButton(text, CopyTextButtonData(data))
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates [SwitchInlineQueryCurrentChatInlineKeyboardButton]
|
* Creates [SwitchInlineQueryCurrentChatInlineKeyboardButton]
|
||||||
|
@ -3376,7 +3376,8 @@ public final class dev/inmo/tgbotapi/extensions/utils/shortcuts/RequestsExecutor
|
|||||||
|
|
||||||
public final class dev/inmo/tgbotapi/extensions/utils/types/buttons/InlineKeyboardBuilderKt {
|
public final class dev/inmo/tgbotapi/extensions/utils/types/buttons/InlineKeyboardBuilderKt {
|
||||||
public static final fun build (Ldev/inmo/tgbotapi/utils/MatrixBuilder;)Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;
|
public static final fun build (Ldev/inmo/tgbotapi/utils/MatrixBuilder;)Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;
|
||||||
public static final fun copyTextButton (Ldev/inmo/tgbotapi/utils/RowBuilder;Ljava/lang/String;)Z
|
public static final fun copyTextButton (Ldev/inmo/tgbotapi/utils/RowBuilder;Ljava/lang/String;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/CopyTextButtonData;)Z
|
||||||
|
public static final fun copyTextButton (Ldev/inmo/tgbotapi/utils/RowBuilder;Ljava/lang/String;Ljava/lang/String;)Z
|
||||||
public static final fun dataButton (Ldev/inmo/tgbotapi/utils/RowBuilder;Ljava/lang/String;Ljava/lang/String;)Z
|
public static final fun dataButton (Ldev/inmo/tgbotapi/utils/RowBuilder;Ljava/lang/String;Ljava/lang/String;)Z
|
||||||
public static final fun flatInlineKeyboard (Lkotlin/jvm/functions/Function1;)Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;
|
public static final fun flatInlineKeyboard (Lkotlin/jvm/functions/Function1;)Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;
|
||||||
public static final fun gameButton (Ldev/inmo/tgbotapi/utils/RowBuilder;Ljava/lang/String;)Z
|
public static final fun gameButton (Ldev/inmo/tgbotapi/utils/RowBuilder;Ljava/lang/String;)Z
|
||||||
|
@ -93,14 +93,26 @@ inline fun InlineKeyboardRowBuilder.loginButton(
|
|||||||
) = add(LoginURLInlineKeyboardButton(text, loginUrl))
|
) = add(LoginURLInlineKeyboardButton(text, loginUrl))
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates and put [LoginURLInlineKeyboardButton]
|
* Creates [CopyTextButton]
|
||||||
*
|
*
|
||||||
* @see inlineKeyboard
|
* @see inlineKeyboard
|
||||||
* @see InlineKeyboardBuilder.row
|
* @see InlineKeyboardBuilder.row
|
||||||
*/
|
*/
|
||||||
inline fun InlineKeyboardRowBuilder.copyTextButton(
|
inline fun InlineKeyboardRowBuilder.copyTextButton(
|
||||||
text: String
|
text: String,
|
||||||
) = add(CopyTextButton(text))
|
data: CopyTextButtonData
|
||||||
|
) = add(CopyTextButton(text, data))
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates [CopyTextButton]
|
||||||
|
*
|
||||||
|
* @see inlineKeyboard
|
||||||
|
* @see InlineKeyboardBuilder.row
|
||||||
|
*/
|
||||||
|
inline fun InlineKeyboardRowBuilder.copyTextButton(
|
||||||
|
text: String,
|
||||||
|
data: String
|
||||||
|
) = copyTextButton(text, CopyTextButtonData(data))
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates and put [SwitchInlineQueryCurrentChatInlineKeyboardButton]
|
* Creates and put [SwitchInlineQueryCurrentChatInlineKeyboardButton]
|
||||||
|
Loading…
Reference in New Issue
Block a user