Struct slashy::framework::Framework[][src]

pub struct Framework<T: SettingsProvider> { /* fields omitted */ }
Expand description

The command framework, holds all commands and settings

Implementations

Creates a new Framework

Adds a command

Adds an EventHandler to run alongside the framework.

Needed because Serenity does not allow more than one EventHandler registered at once and the framework uses it for commands.

Register a Command as a slash command

If guild_id is None then the command is registered globally

Trait Implementations

Dispatched when the cache has received and inserted all data from guilds. Read more

Dispatched when a pin is added, deleted. Read more

Dispatched when a channel is updated. Read more

Dispatched when a user is banned from a guild. Read more

Dispatched when a user’s ban is lifted from a guild. Read more

Dispatched when a guild is created; or an existing guild’s data is sent to us. Read more

Dispatched when a guild is deleted. Read more

Dispatched when the emojis are updated. Read more

Dispatched when a guild’s integration is added, updated or removed. Read more

Dispatched when a user joins a guild. Read more

Dispatched when a user’s membership ends by leaving, getting kicked, or being banned. Read more

Dispatched when a member is updated (e.g their nickname is updated). Read more

Dispatched when the data for offline members was requested. Read more

Dispatched when a role is created. Read more

Dispatched when a role is deleted. Read more

Dispatched when a role is updated. Read more

Dispatched when a guild became unavailable. Read more

Dispatched when the guild is updated. Read more

Dispatched when a invite is created. Read more

Dispatched when a invite is deleted. Read more

Dispatched when a message is deleted. Read more

Dispatched when multiple messages were deleted at once. Read more

Dispatched when a message is updated. Read more

Dispatched when a new reaction is attached to a message. Read more

Dispatched when a reaction is detached from a message. Read more

Dispatched when all reactions of a message are detached from a message. Read more

This event is legacy, and likely no longer sent by discord.

Dispatched when a user’s presence is updated (e.g off -> on). Read more

Dispatched upon reconnection.

Dispatched when a shard’s connection stage is updated Read more

Dispatched when a user starts typing.

Dispatched when an unknown event was sent from discord. Read more

Dispatched when the bot’s data is updated. Read more

Dispatched when a guild’s voice server was updated (or changed to another one). Read more

Dispatched when a user joins, leaves or moves to a voice channel. Read more

Dispatched when a guild’s webhook is updated. Read more

Dispatched when a channel is created. Read more

Dispatched when a category is created. Read more

Dispatched when a category is deleted. Read more

Dispatched when a channel is deleted. Read more

Dispatched upon startup. Read more

Dispatched when a message is created. Read more

Dispatched when a user used a slash command. Read more

Dispatched when a guild integration is created. Read more

Dispatched when a guild integration is updated. Read more

Dispatched when a guild integration is deleted. Read more

Dispatched when an application command is created. Read more

Dispatched when an application command is updated. Read more

Dispatched when an application command is deleted. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.