Icon
Represents a Discord Icon.
Attributes
int
The icon's hash value.
The icon's type.
Properties
as_base_16_hash
Returns the discord side representation of the icon.
Returns
icon : None
, str
as_base_64_data
Returns the base 64 version of the icon if applicable.
Returns
icon : None
, str
Methods
(icon_type, icon_hash)
__init__Creates a new Icon
object with the given attributes.
Parameter | Type | Description |
---|---|---|
icon_type | The icon's type. | |
icon_hash |
| The icon's hash value. |
()
from_base16_hashDeprecated and will be removed in 2024 Marc. Please use from_base_16_hash.
instead.
(icon)
from_base_16_hashConverts a discord icon hash value to an Icon
object.
Parameter | Type | Description |
---|---|---|
icon |
| Discord icon hash. |
Returns
self : Icon
()
__bool__()
__eq__Returns whether the two icons are equal.
()
__getattr__Drops a rich attribute error.
()
__hash__Returns the icon's hash.
()
__iter__Unpacks the icon.
This method is a generator.
()
__len__Length hinter (for unpacking if needed).
()
__repr__Returns the representation of the icon.