1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-11-22 08:13:47 +00:00

renames in request buttons

This commit is contained in:
InsanusMokrassar 2023-02-05 23:26:41 +06:00
parent 12ac227d2d
commit aca076381b
3 changed files with 22 additions and 11 deletions

View File

@ -10,11 +10,8 @@ import dev.inmo.tgbotapi.types.chatIsForumField
import dev.inmo.tgbotapi.types.request.RequestId import dev.inmo.tgbotapi.types.request.RequestId
import dev.inmo.tgbotapi.types.requestIdField import dev.inmo.tgbotapi.types.requestIdField
import dev.inmo.tgbotapi.types.userAdministratorRightsField import dev.inmo.tgbotapi.types.userAdministratorRightsField
import kotlinx.serialization.EncodeDefault
import kotlinx.serialization.KSerializer
import kotlinx.serialization.SerialName import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable import kotlinx.serialization.Serializable
import kotlinx.serialization.Transient
@Serializable @Serializable
data class KeyboardButtonRequestChat( data class KeyboardButtonRequestChat(
@ -25,9 +22,9 @@ data class KeyboardButtonRequestChat(
@SerialName(chatIsForumField) @SerialName(chatIsForumField)
val isForum: Boolean? = null, val isForum: Boolean? = null,
@SerialName(chatHasUsernameField) @SerialName(chatHasUsernameField)
val withUsername: Boolean? = null, val isPublic: Boolean? = null,
@SerialName(chatIsCreatedField) @SerialName(chatIsCreatedField)
val ownedBy: Boolean? = null, val isOwnedBy: Boolean? = null,
@SerialName(userAdministratorRightsField) @SerialName(userAdministratorRightsField)
val userRightsInChat: ChatAdministratorRights? = null, val userRightsInChat: ChatAdministratorRights? = null,
@SerialName(botAdministratorRightsField) @SerialName(botAdministratorRightsField)

View File

@ -154,14 +154,21 @@ inline fun requestChatReplyButton(
requestId: RequestId, requestId: RequestId,
isChannel: Boolean? = null, isChannel: Boolean? = null,
isForum: Boolean? = null, isForum: Boolean? = null,
withUsername: Boolean? = null, isPublic: Boolean? = null,
ownedBy: Boolean? = null, isOwnedBy: Boolean? = null,
userRightsInChat: ChatAdministratorRights? = null, userRightsInChat: ChatAdministratorRights? = null,
botRightsInChat: ChatAdministratorRights? = null, botRightsInChat: ChatAdministratorRights? = null,
botIsMember: Boolean = false botIsMember: Boolean = false
) = requestChatReplyButton( ) = requestChatReplyButton(
text, text,
KeyboardButtonRequestChat( KeyboardButtonRequestChat(
requestId, isChannel, isForum, withUsername, ownedBy, userRightsInChat, botRightsInChat, botIsMember requestId = requestId,
isChannel = isChannel,
isForum = isForum,
isPublic = isPublic,
isOwnedBy = isOwnedBy,
userRightsInChat = userRightsInChat,
botRightsInChat = botRightsInChat,
botIsMember = botIsMember
) )
) )

View File

@ -231,14 +231,21 @@ inline fun ReplyKeyboardRowBuilder.requestChatButton(
requestId: RequestId, requestId: RequestId,
isChannel: Boolean? = null, isChannel: Boolean? = null,
isForum: Boolean? = null, isForum: Boolean? = null,
withUsername: Boolean? = null, isPublic: Boolean? = null,
ownedBy: Boolean? = null, isOwnedBy: Boolean? = null,
userRightsInChat: ChatAdministratorRights? = null, userRightsInChat: ChatAdministratorRights? = null,
botRightsInChat: ChatAdministratorRights? = null, botRightsInChat: ChatAdministratorRights? = null,
botIsMember: Boolean? = null botIsMember: Boolean? = null
) = requestChatButton( ) = requestChatButton(
text, text,
KeyboardButtonRequestChat( KeyboardButtonRequestChat(
requestId, isChannel, isForum, withUsername, ownedBy, userRightsInChat, botRightsInChat, botIsMember requestId = requestId,
isChannel = isChannel,
isForum = isForum,
isPublic = isPublic,
isOwnedBy = isOwnedBy,
userRightsInChat = userRightsInChat,
botRightsInChat = botRightsInChat,
botIsMember = botIsMember
) )
) )