Emoji Models#

class interactions.api.models.emoji.Emoji(kwargs_dict=None, /, **other_kwargs)[स्रोत]#

A class objecting representing an emoji.

चर पद :
  • 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#

संस्करण 4.4.0 से नया .

Formats the emoji into a send-able form.

प्रदत्त प्रकार :

str

property created_at: datetime#

संस्करण 4.4.0 से नया .

Returns when the emoji was created.

async classmethod get(guild_id, emoji_id, client)[स्रोत]#

संस्करण 4.2.0 से नया .

Gets an emoji.

मापदण्ड:
  • 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

प्रदत्त :

The Emoji as object

प्रदत्त प्रकार :

Emoji

async classmethod get_all_of_guild(guild_id, client)[स्रोत]#

संस्करण 4.2.0 से नया .

Gets all emoji of a guild.

मापदण्ड:
  • 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

प्रदत्त :

The Emoji as list

प्रदत्त प्रकार :

List[Emoji]

async modify(guild_id, name=<interactions.MISSING>, roles=<interactions.MISSING>, reason=None)[स्रोत]#

संस्करण 4.4.0 से नया .

Edits the Emoji in a guild.

मापदण्ड:
  • 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

प्रदत्त :

The modified emoji object

प्रदत्त प्रकार :

Emoji

async delete(guild_id, reason=None)[स्रोत]#

संस्करण 4.2.0 से नया .

Deletes the emoji.

मापदण्ड:
  • 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#

संस्करण 4.2.0 से नया .

Returns the emoji's URL.

प्रदत्त :

URL of the emoji

प्रदत्त प्रकार :

str