Crate serenity_utils

Source
Expand description

A library to provide additional utilies for Discord bots created with serenity.

This library provides implementations to easily:

  • Convert a string to serenity’s guild-specific models.
  • Get user response using message or reaction prompts.
  • Display paginated reaction-based messages/menus.
  • Format text in different ways before sending.
  • Create embeds and messages with field access.

See module level documentation for in-depth info about the utilities provided by this crate.

§Installation and Usage

To use this crate, add the following to your Cargo.toml:

[dependencies]
serenity_utils = "0.7.0"

Note: This crate only supports serenity’s async versions.

§Examples

Examples detailing and explaining usage of the basic functionality of the library can be found in the examples directory.

Modules§

builderDeprecated
Provides alternatives to serenity’s message and embed builders.
conversionDeprecated
Provides a trait to convert strings into serenity’s guild-specific models.
formatting
Functions to format text before sending them to the user.
menu
Reaction-based menu functionality.
misc
Miscellaneous utility functions to aid with performing common tasks.
prelude
The prelude re-exports all commonly used types from the library sub-modules.
prompt
Prompts to get user’s response interactively.

Enums§

Error
A common error type for all functions and methods of the library.