Remove unnecessary impl and add dev changelog

main
DaXcess 2023-09-25 16:37:12 +02:00
parent 2daed2f704
commit 1201e44313
No known key found for this signature in database
GPG Key ID: CF78CC72F0FD5EAD
2 changed files with 50 additions and 43 deletions

View File

@ -1,5 +1,14 @@
# Changelog # 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 ## 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). 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).

View File

@ -54,15 +54,14 @@ impl EventHandler for Handler {
// INTERACTION_CREATE event, emitted when the bot receives an interaction (slash command, button, etc.) // INTERACTION_CREATE event, emitted when the bot receives an interaction (slash command, button, etc.)
async fn interaction_create(&self, ctx: Context, interaction: Interaction) { async fn interaction_create(&self, ctx: Context, interaction: Interaction) {
match interaction { match interaction {
Interaction::ApplicationCommand(command) => self.handle_command(ctx, command).await, Interaction::ApplicationCommand(command) => handle_command(ctx, command).await,
Interaction::MessageComponent(component) => self.handle_component(ctx, component).await, Interaction::MessageComponent(component) => handle_component(ctx, component).await,
_ => {} _ => {}
} }
} }
} }
impl Handler { async fn handle_command(ctx: Context, command: ApplicationCommandInteraction) {
async fn handle_command(&self, ctx: Context, command: ApplicationCommandInteraction) {
enforce_guild!(command); enforce_guild!(command);
// Commands must only be executed inside of guilds // Commands must only be executed inside of guilds
@ -99,7 +98,7 @@ impl Handler {
command_manager.execute_command(&ctx, command).await; 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); enforce_guild!(component);
// Components can only be interacted with inside of guilds // Components can only be interacted with inside of guilds
@ -135,4 +134,3 @@ impl Handler {
command_manager.execute_component(&ctx, component).await; command_manager.execute_component(&ctx, component).await;
} }
}