Emoji

@Serializable
data class Emoji(val id: String? = null, val name: String? = null, val whitelistedRoles: List<String>? = null, val creator: User? = null, val requiresWrappingColons: Boolean? = null, val isManaged: Boolean? = null, val isAnimated: Boolean = false, val isAvailable: Boolean = false)(source)

Constructors

Link copied to clipboard
constructor(id: String? = null, name: String? = null, whitelistedRoles: List<String>? = null, creator: User? = null, requiresWrappingColons: Boolean? = null, isManaged: Boolean? = null, isAnimated: Boolean = false, isAvailable: Boolean = false)

Properties

Link copied to clipboard
@SerialName(value = "user")
val creator: User? = null
Link copied to clipboard

Formatted version of an emoji for use in a Message.

Link copied to clipboard
@SerialName(value = "id")
val id: String? = null
Link copied to clipboard
@SerialName(value = "animated")
val isAnimated: Boolean = false
Link copied to clipboard
@SerialName(value = "available")
val isAvailable: Boolean = false
Link copied to clipboard

Convenience method to check if an emoji is a custom emoji.

Link copied to clipboard
@SerialName(value = "managed")
val isManaged: Boolean? = null
Link copied to clipboard

Convenience method to check if an emoji is a Unicode emoji.

Link copied to clipboard
@SerialName(value = "name")
val name: String? = null
Link copied to clipboard
@SerialName(value = "require_colons")
val requiresWrappingColons: Boolean? = null
Link copied to clipboard
Link copied to clipboard

Convenience method to convert an emoji object into a chat formatted emoji.

Link copied to clipboard
@SerialName(value = "roles")
val whitelistedRoles: List<String>? = null

Functions

Link copied to clipboard
fun Emoji.gif(size: Int? = null): String?

Gets the url of the emoji in GIF format, null if the emoji is a unicode character.

Link copied to clipboard
fun Emoji.png(size: Int? = null): String?

Gets the url of the emoji in PNG format, null if the emoji is a unicode character.