Emojis¶
The following section documents everything related to emojis.
Models¶
BaseEmoji¶
ServerEmoji¶
- async delete
- def get_creator
- def get_creator_as_member
- def get_creator_as_user
- def get_server
- def to_dict
- class stoat.ServerEmoji(*, state, id, creator_id, name, animated, nsfw, server_id)[source]¶
Represents an emoji in Stoat
Server.This inherits from
BaseEmoji.- await delete(*, http_overrides=None)[source]¶
This function is a coroutine.
Deletes the emoji.
You must have
manage_customizationto do this if you do not own the emoji, unless it was detached (already deleted).May fire
EmojiDeleteEventfor all server members.Note
If deleting detached emoji, this will successfully return.
Note
Prior to API v0.8.4, this could only be used by non-bot accounts.
- Parameters:
http_overrides (Optional[
HTTPOverrideOptions]) – The HTTP request overrides.- Raises:
HTTPException– Possible values fortype:Value
Reason
IsBotThe current token belongs to bot account. Only applicable to instances running API whose version is lower than
v0.8.3.Unauthorized– Possible values fortype:Value
Reason
InvalidSessionThe current bot/user token is invalid.
Forbidden– Possible values fortype:Value
Reason
MissingPermissionYou do not have the proper permissions to delete an emoji.
NotFound– Possible values fortype:Value
Reason
NotFoundThe emoji/server was not found.
InternalServerError– Possible values fortype:Value
Reason
Populated attributes
DatabaseErrorSomething went wrong during querying database.
DetachedEmoji¶
- def get_creator
- def to_dict
Emoji¶
- class stoat.Emoji¶
An union of all emoji types.
The following classes are included in this union:
ResolvableEmoji¶
- class stoat.ResolvableEmoji¶
An union of either
BaseEmojiorstr(which is either unicode emoji or emoji ID).
- stoat.resolve_emoji(resolvable, /)[source]¶
Resolves emoji’s ID from parameter.
- Parameters:
resolvable (
ResolvableEmoji) – The object to resolve ID from.- Returns:
The resolved emoji’s ID.
- Return type: