Emoji¶
discord_http.emoji module¶
- class discord_http.emoji.Emoji(*, state, data, guild=None)¶
Bases:
PartialEmoji
- Parameters:
state (DiscordAPI)
data (dict)
guild (PartialGuild | None)
- class discord_http.emoji.EmojiParser(emoji)¶
Bases:
object
Used to accept any input and convert to either a normal emoji or a Discord emoji automatically.
It is used for things like reactions, forum, components, etc
Examples
EmojiParser(”👍”)
EmojiParser(“<:name:1234567890>”)
EmojiParser(“1234567890”)
- Parameters:
emoji (str)
- classmethod from_dict(data) Self ¶
Create an emoji from a dictionary.
- Parameters:
data (
dict
) – The dictionary to create the emoji from- Return type:
Self
- Returns:
The emoji
- class discord_http.emoji.PartialEmoji(*, state, id, guild_id=None)¶
Bases:
PartialBase
- Parameters:
state (DiscordAPI)
id (int)
guild_id (int | None)
- async delete(*, reason=None) None ¶
Deletes the emoji.
If guild_id is not defined, it will delete the emoji from the application.
- async edit(*, name=<MISSING>, roles=<MISSING>, reason=None) Emoji ¶
Edits the emoji.
- Parameters:
- Return type:
- Returns:
The edited emoji.
- Raises:
ValueError – Whenever guild_id is not defined
- async fetch() Emoji ¶
Emoji: Fetches the emoji.
If guild_id is not defined, it will fetch the emoji from the application.
- Return type:
- property guild: Guild | PartialGuild | None¶
The guild of the member.