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.
Trait Implementations
Dispatched when the cache has received and inserted all data from guilds. Read more
fn channel_pins_update<'life0, 'async_trait>(
&'life0 self,
ctx: Context,
e: ChannelPinsUpdateEvent
) -> BoxFuture<'async_trait, ()> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
fn channel_pins_update<'life0, 'async_trait>(
&'life0 self,
ctx: Context,
e: ChannelPinsUpdateEvent
) -> BoxFuture<'async_trait, ()> where
'life0: 'async_trait,
Self: 'async_trait,
[src]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
fn guild_delete<'life0, 'async_trait>(
&'life0 self,
ctx: Context,
i: GuildUnavailable,
f: Option<Guild>
) -> BoxFuture<'async_trait, ()> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
fn guild_delete<'life0, 'async_trait>(
&'life0 self,
ctx: Context,
i: GuildUnavailable,
f: Option<Guild>
) -> BoxFuture<'async_trait, ()> where
'life0: 'async_trait,
Self: 'async_trait,
[src]Dispatched when a guild is deleted. Read more
Dispatched when the emojis are updated. Read more
fn guild_integrations_update<'life0, 'async_trait>(
&'life0 self,
ctx: Context,
g: GuildId
) -> BoxFuture<'async_trait, ()> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
fn guild_integrations_update<'life0, 'async_trait>(
&'life0 self,
ctx: Context,
g: GuildId
) -> BoxFuture<'async_trait, ()> where
'life0: 'async_trait,
Self: 'async_trait,
[src]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
fn guild_members_chunk<'life0, 'async_trait>(
&'life0 self,
ctx: Context,
c: GuildMembersChunkEvent
) -> BoxFuture<'async_trait, ()> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
fn guild_members_chunk<'life0, 'async_trait>(
&'life0 self,
ctx: Context,
c: GuildMembersChunkEvent
) -> BoxFuture<'async_trait, ()> where
'life0: 'async_trait,
Self: 'async_trait,
[src]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
fn guild_update<'life0, 'async_trait>(
&'life0 self,
ctx: Context,
o: Option<Guild>,
n: PartialGuild
) -> BoxFuture<'async_trait, ()> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
fn guild_update<'life0, 'async_trait>(
&'life0 self,
ctx: Context,
o: Option<Guild>,
n: PartialGuild
) -> BoxFuture<'async_trait, ()> where
'life0: 'async_trait,
Self: 'async_trait,
[src]Dispatched when the guild is updated. Read more
fn invite_create<'life0, 'async_trait>(
&'life0 self,
ctx: Context,
d: InviteCreateEvent
) -> BoxFuture<'async_trait, ()> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
fn invite_create<'life0, 'async_trait>(
&'life0 self,
ctx: Context,
d: InviteCreateEvent
) -> BoxFuture<'async_trait, ()> where
'life0: 'async_trait,
Self: 'async_trait,
[src]Dispatched when a invite is created. Read more
fn invite_delete<'life0, 'async_trait>(
&'life0 self,
ctx: Context,
d: InviteDeleteEvent
) -> BoxFuture<'async_trait, ()> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
fn invite_delete<'life0, 'async_trait>(
&'life0 self,
ctx: Context,
d: InviteDeleteEvent
) -> BoxFuture<'async_trait, ()> where
'life0: 'async_trait,
Self: 'async_trait,
[src]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
fn message_update<'life0, 'async_trait>(
&'life0 self,
ctx: Context,
o: Option<Message>,
n: Option<Message>,
e: MessageUpdateEvent
) -> BoxFuture<'async_trait, ()> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
fn message_update<'life0, 'async_trait>(
&'life0 self,
ctx: Context,
o: Option<Message>,
n: Option<Message>,
e: MessageUpdateEvent
) -> BoxFuture<'async_trait, ()> where
'life0: 'async_trait,
Self: 'async_trait,
[src]Dispatched when a message is updated. Read more
fn reaction_add<'life0, 'async_trait>(
&'life0 self,
ctx: Context,
a: Reaction
) -> BoxFuture<'async_trait, ()> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
fn reaction_add<'life0, 'async_trait>(
&'life0 self,
ctx: Context,
a: Reaction
) -> BoxFuture<'async_trait, ()> where
'life0: 'async_trait,
Self: 'async_trait,
[src]Dispatched when a new reaction is attached to a message. Read more
fn reaction_remove<'life0, 'async_trait>(
&'life0 self,
ctx: Context,
r: Reaction
) -> BoxFuture<'async_trait, ()> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
fn reaction_remove<'life0, 'async_trait>(
&'life0 self,
ctx: Context,
r: Reaction
) -> BoxFuture<'async_trait, ()> where
'life0: 'async_trait,
Self: 'async_trait,
[src]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.
fn presence_update<'life0, 'async_trait>(
&'life0 self,
ctx: Context,
n: PresenceUpdateEvent
) -> BoxFuture<'async_trait, ()> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
fn presence_update<'life0, 'async_trait>(
&'life0 self,
ctx: Context,
n: PresenceUpdateEvent
) -> BoxFuture<'async_trait, ()> where
'life0: 'async_trait,
Self: 'async_trait,
[src]Dispatched when a user’s presence is updated (e.g off -> on). Read more
fn resume<'life0, 'async_trait>(
&'life0 self,
ctx: Context,
a: ResumedEvent
) -> BoxFuture<'async_trait, ()> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
fn resume<'life0, 'async_trait>(
&'life0 self,
ctx: Context,
a: ResumedEvent
) -> BoxFuture<'async_trait, ()> where
'life0: 'async_trait,
Self: 'async_trait,
[src]Dispatched upon reconnection.
fn shard_stage_update<'life0, 'async_trait>(
&'life0 self,
ctx: Context,
a: ShardStageUpdateEvent
) -> BoxFuture<'async_trait, ()> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
fn shard_stage_update<'life0, 'async_trait>(
&'life0 self,
ctx: Context,
a: ShardStageUpdateEvent
) -> BoxFuture<'async_trait, ()> where
'life0: 'async_trait,
Self: 'async_trait,
[src]Dispatched when a shard’s connection stage is updated Read more
fn typing_start<'life0, 'async_trait>(
&'life0 self,
ctx: Context,
a: TypingStartEvent
) -> BoxFuture<'async_trait, ()> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
fn typing_start<'life0, 'async_trait>(
&'life0 self,
ctx: Context,
a: TypingStartEvent
) -> BoxFuture<'async_trait, ()> where
'life0: 'async_trait,
Self: 'async_trait,
[src]Dispatched when a user starts typing.
Dispatched when an unknown event was sent from discord. Read more
fn user_update<'life0, 'async_trait>(
&'life0 self,
ctx: Context,
o: CurrentUser,
n: CurrentUser
) -> BoxFuture<'async_trait, ()> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
fn user_update<'life0, 'async_trait>(
&'life0 self,
ctx: Context,
o: CurrentUser,
n: CurrentUser
) -> BoxFuture<'async_trait, ()> where
'life0: 'async_trait,
Self: 'async_trait,
[src]Dispatched when the bot’s data is updated. Read more
fn voice_server_update<'life0, 'async_trait>(
&'life0 self,
ctx: Context,
a: VoiceServerUpdateEvent
) -> BoxFuture<'async_trait, ()> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
fn voice_server_update<'life0, 'async_trait>(
&'life0 self,
ctx: Context,
a: VoiceServerUpdateEvent
) -> BoxFuture<'async_trait, ()> where
'life0: 'async_trait,
Self: 'async_trait,
[src]Dispatched when a guild’s voice server was updated (or changed to another one). Read more
fn voice_state_update<'life0, 'async_trait>(
&'life0 self,
ctx: Context,
a: Option<GuildId>,
o: Option<VoiceState>,
n: VoiceState
) -> BoxFuture<'async_trait, ()> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
fn voice_state_update<'life0, 'async_trait>(
&'life0 self,
ctx: Context,
a: Option<GuildId>,
o: Option<VoiceState>,
n: VoiceState
) -> BoxFuture<'async_trait, ()> where
'life0: 'async_trait,
Self: 'async_trait,
[src]Dispatched when a user joins, leaves or moves to a voice channel. Read more
Dispatched when a guild’s webhook is updated. Read more
fn channel_create<'life0, 'a, 'async_trait>(
&'life0 self,
ctx: Context,
e: &'a GuildChannel
) -> BoxFuture<'async_trait, ()> where
'life0: 'async_trait,
'a: 'async_trait,
Self: 'async_trait,
[src]
fn channel_create<'life0, 'a, 'async_trait>(
&'life0 self,
ctx: Context,
e: &'a GuildChannel
) -> BoxFuture<'async_trait, ()> where
'life0: 'async_trait,
'a: 'async_trait,
Self: 'async_trait,
[src]Dispatched when a channel is created. Read more
fn category_create<'life0, 'a, 'async_trait>(
&'life0 self,
ctx: Context,
e: &'a ChannelCategory
) -> BoxFuture<'async_trait, ()> where
'life0: 'async_trait,
'a: 'async_trait,
Self: 'async_trait,
[src]
fn category_create<'life0, 'a, 'async_trait>(
&'life0 self,
ctx: Context,
e: &'a ChannelCategory
) -> BoxFuture<'async_trait, ()> where
'life0: 'async_trait,
'a: 'async_trait,
Self: 'async_trait,
[src]Dispatched when a category is created. Read more
fn category_delete<'life0, 'a, 'async_trait>(
&'life0 self,
ctx: Context,
e: &'a ChannelCategory
) -> BoxFuture<'async_trait, ()> where
'life0: 'async_trait,
'a: 'async_trait,
Self: 'async_trait,
[src]
fn category_delete<'life0, 'a, 'async_trait>(
&'life0 self,
ctx: Context,
e: &'a ChannelCategory
) -> BoxFuture<'async_trait, ()> where
'life0: 'async_trait,
'a: 'async_trait,
Self: 'async_trait,
[src]Dispatched when a category is deleted. Read more
fn channel_delete<'life0, 'a, 'async_trait>(
&'life0 self,
ctx: Context,
e: &'a GuildChannel
) -> BoxFuture<'async_trait, ()> where
'life0: 'async_trait,
'a: 'async_trait,
Self: 'async_trait,
[src]
fn channel_delete<'life0, 'a, 'async_trait>(
&'life0 self,
ctx: Context,
e: &'a GuildChannel
) -> BoxFuture<'async_trait, ()> where
'life0: 'async_trait,
'a: 'async_trait,
Self: 'async_trait,
[src]Dispatched when a channel is deleted. Read more
Dispatched upon startup. Read more
Dispatched when a message is created. Read more
fn interaction_create<'life0, 'async_trait>(
&'life0 self,
ctx: Context,
interaction: Interaction
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
fn interaction_create<'life0, 'async_trait>(
&'life0 self,
ctx: Context,
interaction: Interaction
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]Dispatched when a user used a slash command. Read more
#[must_use]fn integration_create<'life0, 'async_trait>(
&'life0 self,
_ctx: Context,
_integration: Integration
) -> Pin<Box<dyn Future<Output = ()> + 'async_trait + Send, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
#[must_use]fn integration_create<'life0, 'async_trait>(
&'life0 self,
_ctx: Context,
_integration: Integration
) -> Pin<Box<dyn Future<Output = ()> + 'async_trait + Send, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]Dispatched when a guild integration is created. Read more
#[must_use]fn integration_update<'life0, 'async_trait>(
&'life0 self,
_ctx: Context,
_integration: Integration
) -> Pin<Box<dyn Future<Output = ()> + 'async_trait + Send, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
#[must_use]fn integration_update<'life0, 'async_trait>(
&'life0 self,
_ctx: Context,
_integration: Integration
) -> Pin<Box<dyn Future<Output = ()> + 'async_trait + Send, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]Dispatched when a guild integration is updated. Read more
#[must_use]fn integration_delete<'life0, 'async_trait>(
&'life0 self,
_ctx: Context,
_integration_id: IntegrationId,
_guild_id: GuildId,
_application_id: Option<ApplicationId>
) -> Pin<Box<dyn Future<Output = ()> + 'async_trait + Send, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
#[must_use]fn integration_delete<'life0, 'async_trait>(
&'life0 self,
_ctx: Context,
_integration_id: IntegrationId,
_guild_id: GuildId,
_application_id: Option<ApplicationId>
) -> Pin<Box<dyn Future<Output = ()> + 'async_trait + Send, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]Dispatched when a guild integration is deleted. Read more
#[must_use]fn application_command_create<'life0, 'async_trait>(
&'life0 self,
_ctx: Context,
_application_command: ApplicationCommand
) -> Pin<Box<dyn Future<Output = ()> + 'async_trait + Send, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
#[must_use]fn application_command_create<'life0, 'async_trait>(
&'life0 self,
_ctx: Context,
_application_command: ApplicationCommand
) -> Pin<Box<dyn Future<Output = ()> + 'async_trait + Send, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]Dispatched when an application command is created. Read more
#[must_use]fn application_command_update<'life0, 'async_trait>(
&'life0 self,
_ctx: Context,
_application_command: ApplicationCommand
) -> Pin<Box<dyn Future<Output = ()> + 'async_trait + Send, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
#[must_use]fn application_command_update<'life0, 'async_trait>(
&'life0 self,
_ctx: Context,
_application_command: ApplicationCommand
) -> Pin<Box<dyn Future<Output = ()> + 'async_trait + Send, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]Dispatched when an application command is updated. Read more
#[must_use]fn application_command_delete<'life0, 'async_trait>(
&'life0 self,
_ctx: Context,
_application_command: ApplicationCommand
) -> Pin<Box<dyn Future<Output = ()> + 'async_trait + Send, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
#[must_use]fn application_command_delete<'life0, 'async_trait>(
&'life0 self,
_ctx: Context,
_application_command: ApplicationCommand
) -> Pin<Box<dyn Future<Output = ()> + 'async_trait + Send, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]Dispatched when an application command is deleted. Read more
Auto Trait Implementations
impl<T> !RefUnwindSafe for Framework<T>
impl<T> !UnwindSafe for Framework<T>