Remove unnecessary impl and add dev changelog
parent
2daed2f704
commit
1201e44313
|
@ -1,5 +1,14 @@
|
|||
# Changelog
|
||||
|
||||
## Current dev branch
|
||||
In this section of the change log all current changes that have been made since the last version will be documented. This list will grow as more changes are made, until the next release. Upon the next release the list will be cleared.
|
||||
|
||||
### Changes
|
||||
* Removed OpenSSL dependency
|
||||
* Added aarch64 support
|
||||
* Added cross compilation to Github Actions
|
||||
* Added `dev` branch to Github Actions
|
||||
|
||||
## 2.1.1 | September 23rd 2023
|
||||
Reduced the amount of CPU that the bot uses from ~15%-25% per user to 1%-2% per user (percentage per core, benched on an AMD Ryzen 9 5950X).
|
||||
|
||||
|
|
|
@ -54,15 +54,14 @@ impl EventHandler for Handler {
|
|||
// INTERACTION_CREATE event, emitted when the bot receives an interaction (slash command, button, etc.)
|
||||
async fn interaction_create(&self, ctx: Context, interaction: Interaction) {
|
||||
match interaction {
|
||||
Interaction::ApplicationCommand(command) => self.handle_command(ctx, command).await,
|
||||
Interaction::MessageComponent(component) => self.handle_component(ctx, component).await,
|
||||
Interaction::ApplicationCommand(command) => handle_command(ctx, command).await,
|
||||
Interaction::MessageComponent(component) => handle_component(ctx, component).await,
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Handler {
|
||||
async fn handle_command(&self, ctx: Context, command: ApplicationCommandInteraction) {
|
||||
async fn handle_command(ctx: Context, command: ApplicationCommandInteraction) {
|
||||
enforce_guild!(command);
|
||||
|
||||
// Commands must only be executed inside of guilds
|
||||
|
@ -99,7 +98,7 @@ impl Handler {
|
|||
command_manager.execute_command(&ctx, command).await;
|
||||
}
|
||||
|
||||
async fn handle_component(&self, ctx: Context, component: MessageComponentInteraction) {
|
||||
async fn handle_component(ctx: Context, component: MessageComponentInteraction) {
|
||||
enforce_guild!(component);
|
||||
|
||||
// Components can only be interacted with inside of guilds
|
||||
|
@ -135,4 +134,3 @@ impl Handler {
|
|||
|
||||
command_manager.execute_component(&ctx, component).await;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue