Emoji Models#

class interactions.api.models.emoji.Emoji(kwargs_dict=None, /, **other_kwargs)[source]#

A class objecting representing an emoji.

Variables:
  • id (Optional[Snowflake]) – Emoji id

  • name (Optional[str]) – Emoji name.

  • roles (Optional[List[int]]) – Roles allowed to use this emoji

  • user (Optional[User]) – User that created this emoji

  • require_colons (Optional[bool]) – Status denoting of this emoji must be wrapped in colons

  • managed (Optional[bool]) – Status denoting if this emoji is managed (by an integration)

  • animated (Optional[bool]) – Status denoting if this emoji is animated

  • available (Optional[bool]) – Status denoting if this emoji can be used. (Can be false via server boosting)

property format: str#

New in version 4.4.0.

Formats the emoji into a send-able form.

Return type:

str

property created_at: datetime#

New in version 4.4.0.

Returns when the emoji was created.

async classmethod get(guild_id, emoji_id, client)[source]#

New in version 4.2.0.

Gets an emoji.

Parameters:
  • guild_id (Union[int, Snowflake, Guild]) – The id of the guild of the emoji

  • emoji_id (Union[int, Snowflake]) – The id of the emoji

  • client (HTTPClient) – The HTTPClient of your bot. Equals to bot._http

Returns:

The Emoji as object

Return type:

Emoji

async classmethod get_all_of_guild(guild_id, client)[source]#

New in version 4.2.0.

Gets all emoji of a guild.

Parameters:
  • guild_id (Union[int, Snowflake, Guild]) – The id of the guild to get the emojis of

  • client (HTTPClient) – The HTTPClient of your bot. Equals to bot._http

Returns:

The Emoji as list

Return type:

List[Emoji]

async modify(guild_id, name=<interactions.MISSING>, roles=<interactions.MISSING>, reason=None)[source]#

New in version 4.4.0.

Edits the Emoji in a guild.

Parameters:
  • guild_id (int) – The id of the guild to edit the emoji on

  • name (Optional[str]) – The name of the emoji. If not specified, the filename will be used

  • roles (Optional[Union[List[Role], List[int]]]) – Roles allowed to use this emoji

  • reason (Optional[str]) – The reason of the modification

Returns:

The modified emoji object

Return type:

Emoji

async delete(guild_id, reason=None)[source]#

New in version 4.2.0.

Deletes the emoji.

Parameters:
  • guild_id (Union[int, Snowflake, Guild]) – The guild id to delete the emoji from

  • reason (Optional[str]) – The reason for the deletion

property url: str#

New in version 4.2.0.

Returns the emoji’s URL.

Returns:

URL of the emoji

Return type:

str