[−][src]Module serenity::utils
A set of utilities to help with common use cases that are not required to fully use the library.
Structs
Colour |
A utility struct to help with working with the basic representation of a
colour. This is particularly useful when working with a |
Content |
Describes formatting on string content |
ContentSafeOptions |
Struct that allows to alter |
MessageBuilder |
The Message Builder is an ergonomic utility to easily build a message, by adding text and mentioning mentionable structs. |
VecMap |
Like |
Enums
ContentModifier |
Formatting modifiers for MessageBuilder content pushes |
Functions
content_safe |
Transforms role, channel, user, |
hashmap_to_json_map |
Converts a HashMap into a final |
is_nsfw |
[ Deprecated ] Determines if a name is NSFW. |
parse_channel |
Retrieves an Id from a channel mention. |
parse_emoji |
Retrieves the name and Id from an emoji mention, in the form of an
|
parse_invite |
Retrieves the "code" part of an invite out of a URL. |
parse_mention |
Retrieve the ID number out of a channel, role, or user mention. |
parse_quotes |
Turns a string into a vector of string arguments, splitting by spaces, but parsing content within quotes as one individual argument. |
parse_role |
Retrieves an Id from a role mention. |
parse_username |
Retrieves an Id from a user mention. |
read_image |
Reads an image from a path and encodes it into base64. |
shard_id |
Calculates the Id of the shard responsible for a guild, given its Id and total number of shards used. |
vecmap_to_json_map |
Converts a VecMap into a final |
with_cache |
A function for doing automatic |
with_cache_mut |
Like |