mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-22 00:03:48 +00:00
add opportunity to create Hex from rgb
This commit is contained in:
parent
88f6b349ea
commit
c92ed92f7c
@ -15,37 +15,37 @@ data class PromoteChatMember(
|
|||||||
@SerialName(userIdField)
|
@SerialName(userIdField)
|
||||||
override val userId: UserId,
|
override val userId: UserId,
|
||||||
@SerialName(untilDateField)
|
@SerialName(untilDateField)
|
||||||
override val untilDate: TelegramDate?,
|
override val untilDate: TelegramDate? = null,
|
||||||
@SerialName(isAnonymousField)
|
@SerialName(isAnonymousField)
|
||||||
private val isAnonymous: Boolean?,
|
private val isAnonymous: Boolean? = null,
|
||||||
@SerialName(canChangeInfoField)
|
@SerialName(canChangeInfoField)
|
||||||
private val canChangeInfo: Boolean?,
|
private val canChangeInfo: Boolean? = null,
|
||||||
@SerialName(canPostMessagesField)
|
@SerialName(canPostMessagesField)
|
||||||
private val canPostMessages: Boolean?,
|
private val canPostMessages: Boolean? = null,
|
||||||
@SerialName(canEditMessagesField)
|
@SerialName(canEditMessagesField)
|
||||||
private val canEditMessages: Boolean?,
|
private val canEditMessages: Boolean? = null,
|
||||||
@SerialName(canDeleteMessagesField)
|
@SerialName(canDeleteMessagesField)
|
||||||
private val canDeleteMessages: Boolean?,
|
private val canDeleteMessages: Boolean? = null,
|
||||||
@SerialName(canInviteUsersField)
|
@SerialName(canInviteUsersField)
|
||||||
private val canInviteUsers: Boolean?,
|
private val canInviteUsers: Boolean? = null,
|
||||||
@SerialName(canRestrictMembersField)
|
@SerialName(canRestrictMembersField)
|
||||||
private val canRestrictMembers: Boolean?,
|
private val canRestrictMembers: Boolean? = null,
|
||||||
@SerialName(canPinMessagesField)
|
@SerialName(canPinMessagesField)
|
||||||
private val canPinMessages: Boolean?,
|
private val canPinMessages: Boolean? = null,
|
||||||
@SerialName(canPromoteMembersField)
|
@SerialName(canPromoteMembersField)
|
||||||
private val canPromoteMembers: Boolean?,
|
private val canPromoteMembers: Boolean? = null,
|
||||||
@SerialName(canManageVideoChatsField)
|
@SerialName(canManageVideoChatsField)
|
||||||
private val canManageVideoChats: Boolean?,
|
private val canManageVideoChats: Boolean? = null,
|
||||||
@SerialName(canManageChatField)
|
@SerialName(canManageChatField)
|
||||||
private val canManageChat: Boolean?,
|
private val canManageChat: Boolean? = null,
|
||||||
@SerialName(canManageTopicsField)
|
@SerialName(canManageTopicsField)
|
||||||
private val canManageTopics: Boolean?,
|
private val canManageTopics: Boolean? = null,
|
||||||
@SerialName(canPostStoriesField)
|
@SerialName(canPostStoriesField)
|
||||||
private val canPostStories: Boolean?,
|
private val canPostStories: Boolean? = null,
|
||||||
@SerialName(canEditStoriesField)
|
@SerialName(canEditStoriesField)
|
||||||
private val canEditStories: Boolean?,
|
private val canEditStories: Boolean? = null,
|
||||||
@SerialName(canDeleteStoriesField)
|
@SerialName(canDeleteStoriesField)
|
||||||
private val canDeleteStories: Boolean?
|
private val canDeleteStories: Boolean? = null
|
||||||
) : ChatMemberRequest<Boolean>, UntilDate {
|
) : ChatMemberRequest<Boolean>, UntilDate {
|
||||||
override fun method(): String = "promoteChatMember"
|
override fun method(): String = "promoteChatMember"
|
||||||
override val resultDeserializer: DeserializationStrategy<Boolean>
|
override val resultDeserializer: DeserializationStrategy<Boolean>
|
||||||
|
@ -8,7 +8,9 @@ sealed interface Color {
|
|||||||
value class BackgroundColor(override val value: String) : Color
|
value class BackgroundColor(override val value: String) : Color
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
value class Hex(override val value: String) : Color
|
value class Hex(override val value: String) : Color {
|
||||||
|
constructor(r: UByte, g: UByte, b: UByte) : this("#${r.toString(16)}${g.toString(16)}${b.toString(16)}")
|
||||||
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
val BackgroundColor = BackgroundColor("bg_color")
|
val BackgroundColor = BackgroundColor("bg_color")
|
||||||
|
Loading…
Reference in New Issue
Block a user