Struct serenity::model::Emoji [] [src]

pub struct Emoji {
    pub id: EmojiId,
    pub name: String,
    pub managed: bool,
    pub require_colons: bool,
    pub roles: Vec<RoleId>,
}

Represents a custom guild emoji, which can either be created using the API, or via an integration. Emojis created using the API only work within the guild it was created in.

Fields

The Id of the emoji.

The name of the emoji. It must be at least 2 characters long and can only contain alphanumeric characters and underscores.

Whether the emoji is managed via an Integration service.

Whether the emoji name needs to be surrounded by colons in order to be used by the client.

A list of Roles that are allowed to use the emoji. If there are no roles specified, then usage is unrestricted.

Methods

impl Emoji
[src]

Deletes the emoji.

Note: The Manage Emojis permission is required.

Note: Only user accounts may use this method.

Edits the emoji by updating it with a new name.

Note: The Manage Emojis permission is required.

Note: Only user accounts may use this method.

Finds the Guild that owns the emoji by looking through the Cache.

Generates a URL to the emoji's image.

Trait Implementations

impl Display for Emoji
[src]

Formats the emoji into a string that will cause Discord clients to render the emoji.

This is in the format of: <:NAME:EMOJI_ID>.

impl Mentionable for Emoji
[src]

impl Clone for Emoji
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Emoji
[src]

Formats the value using the given formatter.