DDBKitUtilities
Extensions
DDBKitUtilities exposes a collection of useful extensions for your Discord bots.
BucketRatelimiting
Your Discord bot may have a number of commands that use expensive resources or external service limits.
To prevent abuse, you can use the BucketRatelimiting
extension to rate limit these commands.
To get started, register the extension at boot.
You can now use the ratelimited()
modifier on your commands to rate limit them.
You can customise it by passing in a configuration object.
The example above would rate limit the command to 10 uses per minute.
Builders
DDBKitUtilities provides a collection of utiltity builders for various structured types. This allows for a more concise and readable way to instance these types.
Message builder
You can build a simple message with text content with the Message
struct.
Text Content
MessageContentComponent
types such asText
can be used at the root of aMessage
builder to set the message content easily.
Text Formatting
The following example demonstrates many of the available modifiers and components.