Role
PartialRole
Represents a Partial Role
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
client |
Client
|
The client application that models may use for procedures. |
required |
id |
int
|
The unique ID of the role. |
required |
Attributes:
| Name | Type | Description |
|---|---|---|
client |
Client
|
The client application that models may use for procedures. |
id |
int
|
The unique ID of the role. |
Source code in dismake/models/role.py
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | |
mention
property
mention: str
Return a raw mention string for the role.
Role
Bases: PartialRole
Represents a Role.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
client |
Client
|
The client application that models may use for procedures. |
required |
data |
RoleData
|
The data payload containing role information. |
required |
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
The name of the role. |
color |
int
|
The color code of the role. |
hoist |
bool
|
Whether the role is hoisted. |
unicode_emoji |
Optional[str]
|
The Unicode emoji associated with the role. |
position |
int
|
The position of the role. |
permissions |
Permissions
|
The permissions granted to the role. |
managed |
bool
|
Whether the role is managed. |
mentionable |
bool
|
Whether the role is mentionable. |
Operations
-
x == y: Checks if two roles are equal. -
x != y: Checks if two roles are not equal. -
str(x): Returns the role's name.
Source code in dismake/models/role.py
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 | |
bot_id
property
bot_id: Optional[int]
The ID of the bot this role belongs to.
created_at
property
created_at: datetime
Returns the role's creation time in UTC.
display_icon
property
display_icon: Optional[Union[Asset, str]]
Returns the role's display icon, if available.
icon
property
icon: Optional[Asset]
Returns the role's icon asset, if available.
If this is None, the role might instead have unicode emoji as its icon
If you want the icon that a role has displayed, consider using Role.display_icon.
integration_id
property
integration_id: Optional[int]
The ID of the integration this role belongs to.
is_available_for_purchase
property
is_available_for_purchase: bool
Whether this role is available for purchase.
is_guild_linked_role
property
is_guild_linked_role: bool
Whether this role is a linked role in the guild.
is_premium_subscriber
property
is_premium_subscriber: bool
Whether this role is the guild's nitro subscriber role.
subscription_listing_id
property
subscription_listing_id: Optional[int]
The ID of this role's subscription SKU and listing.