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>, }
A custom emoji for a guild.
Fields
id: EmojiId
The Id of the emoji.
name: String
The name of the emoji.
managed: bool
Whether the emoji is managed via an integration service.
require_colons: bool
Whether the emoji name needs to be surrounded by colons in order to be used by the client.
roles: Vec<RoleId>
A list of Role
s that are allowed to use the emoji. If there are no roles specified, then usage is unrestricted.
Methods
impl Emoji
[src]
fn find_guild_id(&self) -> Option<GuildId>
Finds the Guild
that owns the emoji by looking through the Cache.
fn delete(&self) -> Result<()>
Deletes the emoji.
Note: The Manage Emojis permission is required.
Note: Only user accounts may use this method.
fn edit(&mut self, name: &str) -> Result<()>
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.
Trait Implementations
impl Display for Emoji
[src]
fn fmt(&self, f: &mut Formatter) -> Result
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]
fn clone(&self) -> Emoji
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more