Emoji Parser Implementation¶
Parser implementations for disnake emoji types.
Classes¶
- class disnake_compass.impl.parser.emoji.PartialEmojiParser(int_parser=NOTHING)[source]¶
Bases:
Parser[PartialEmoji]Parser type with support for partial emoji.
Attributes¶
Methods¶
- await dumps(argument, /)[source]¶
Dump a partial emoji into a string.
This uses the underlying
int_parser.- Parameters:
argument (
PartialEmoji) – The value that is to be dumped.
- await loads(argument, /)[source]¶
Load a partial emoji from a string.
This uses the underlying
int_parser.- Parameters:
argument (
str) – The value that is to be loaded into a partial emoji.
- class disnake_compass.impl.parser.emoji.EmojiParser(*, int_parser=NOTHING, allow_api_requests=True)[source]¶
-
Synchronous parser type with support for emoji.
- Parameters:
Attributes¶
Methods¶
- await dumps(argument, /)[source]¶
Dump an emoji into a string.
This uses the underlying
int_parser.- Parameters:
argument (
Emoji) – The value that is to be dumped.
- await loads(argument, /)[source]¶
Load an emoji from a string.
This uses the underlying
int_parser.- Parameters:
argument (
str) – The value that is to be loaded into an emoji.- Raises:
LookupError – An emoji with the id stored in the
argumentcould not be found.
- class disnake_compass.impl.parser.emoji.StickerParser(*, int_parser=NOTHING, allow_api_requests=True)[source]¶
-
Synchronous parser type with support for stickers.
- Parameters:
Attributes¶
Methods¶
- await dumps(argument, /)[source]¶
Dump a sticker into a string.
This uses the underlying
int_parser.- Parameters:
argument (
Sticker) – The value that is to be dumped.
- await loads(argument, /)[source]¶
Load a sticker from a string.
This uses the underlying
int_parser.- Parameters:
argument (
str) – The value that is to be loaded into a sticker.- Raises:
LookupError – A sticker with the id stored in the
argumentcould not be found.