discord_webhook2/roles/
mod.rs

1use serde::{Deserialize, Serialize};
2
3use crate::id::DiscordID;
4use crate::roles::flags::RoleFlags;
5use crate::roles::tags::RoleTags;
6
7pub mod flags;
8pub mod tags;
9
10#[derive(Serialize, Deserialize, Debug, Clone)]
11pub struct Role {
12    /// Role id
13    id: DiscordID,
14    /// Role name
15    name: String,
16    /// Integer representation of hexadecimal color code
17    color: u32,
18    /// If this role is pinned in the user listing
19    hoist: bool,
20    /// Role icon hash
21    icon_hash: Option<String>,
22    /// Role unicode emoji
23    unicode_emoji: Option<String>,
24    /// Position of this role (roles with the same position are sorted by id)
25    position: u32,
26    /// Permission bit set
27    permissions: String,
28    /// Whether this role is managed by an integration
29    managed: bool,
30    /// Whether this role is mentionable
31    mentionable: bool,
32    tags: Option<RoleTags>,
33    /// Role flags combined as a bitfield
34    flags: RoleFlags,
35}