Module serenity::utils
[−]
[src]
A set of utilities to help with common use cases that are not required to fully use the library.
Reexports
pub use super::builder; |
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 |
| MessageBuilder |
The Message Builder is an ergonomic utility to easily build a message, by adding text and mentioning mentionable structs. |
Enums
| ContentModifier |
Formatting modifiers for MessageBuilder content pushes |
Functions
| is_nsfw |
Determines if a name is NSFW. |
| parse_channel |
Retreives an Id from a channel mention. |
| parse_emoji |
Retreives 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_quotes |
Turns a string into a vector of string arguments, splitting by spaces, but parsing content within quotes as one individual argument. |
| parse_role |
Retreives an Id from a role mention. |
| parse_username |
Retreives 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. |
| with_cache |
A function for doing automatic |
| with_cache_mut |
Like |