Run cargo fmt --all
This commit is contained in:
@@ -5,9 +5,13 @@ use deadpool_redis::{cluster::PoolError, redis::RedisError};
|
||||
use thiserror::Error;
|
||||
use twilight_http::response::DeserializeBodyError;
|
||||
|
||||
use crate::{database::models::{DatabaseError, DatabaseOrDiscordError}, framework::{commands::{
|
||||
arguments::Argument, context::CommandContext, permissions::Permission,
|
||||
}, runtime::Runtime}};
|
||||
use crate::{
|
||||
database::models::{DatabaseError, DatabaseOrDiscordError},
|
||||
framework::{
|
||||
commands::{arguments::Argument, context::CommandContext, permissions::Permission},
|
||||
runtime::Runtime,
|
||||
},
|
||||
};
|
||||
|
||||
pub mod arguments;
|
||||
pub mod context;
|
||||
@@ -40,7 +44,7 @@ pub enum CommandError {
|
||||
RedisFailed(#[from] RedisError),
|
||||
|
||||
#[error(transparent)]
|
||||
DatabaseOrDiscordError(#[from] DatabaseOrDiscordError)
|
||||
DatabaseOrDiscordError(#[from] DatabaseOrDiscordError),
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
|
||||
@@ -81,9 +81,7 @@ where
|
||||
))
|
||||
.await
|
||||
.inspect(|_| log::debug!("Executed component interaction"))
|
||||
.inspect_err(|e| {
|
||||
log::error!("Interaction execution failed: {e:?}")
|
||||
})
|
||||
.inspect_err(|e| log::error!("Interaction execution failed: {e:?}"))
|
||||
} else {
|
||||
Err(InteractionError::InteractionNotFound)
|
||||
}
|
||||
|
||||
@@ -3,14 +3,22 @@ use async_trait::async_trait;
|
||||
use crate::{
|
||||
extras::Extras,
|
||||
framework::commands::{
|
||||
arguments::{Arg, Argument, NeedyString, ParseArguments}, context::CommandContext, Command, CommandError
|
||||
Command, CommandError,
|
||||
arguments::{Arg, Argument, NeedyString, ParseArguments},
|
||||
context::CommandContext,
|
||||
},
|
||||
groups::{about::{
|
||||
groups::{
|
||||
about::{
|
||||
components::{
|
||||
HelpDonateLinkButton, HelpGoBackButton, HelpSupportLinkButton, HelpWebsiteLinkButton,
|
||||
HelpDonateLinkButton, HelpGoBackButton, HelpSupportLinkButton,
|
||||
HelpWebsiteLinkButton,
|
||||
},
|
||||
embeds::{
|
||||
get_all_command_help_embed, get_command_help_embed, get_command_not_found_embed,
|
||||
},
|
||||
},
|
||||
calls::components::CodeOfConductButton,
|
||||
},
|
||||
embeds::{get_all_command_help_embed, get_command_help_embed, get_command_not_found_embed},
|
||||
}, calls::components::CodeOfConductButton},
|
||||
state::State,
|
||||
};
|
||||
|
||||
|
||||
@@ -11,7 +11,9 @@ use crate::{
|
||||
database::models::Channel,
|
||||
extras::Extras,
|
||||
framework::{
|
||||
commands::extras::ExtrasGetter, events::traits::{EventResult, OnMessageHandler}, runtime::Runtime
|
||||
commands::extras::ExtrasGetter,
|
||||
events::traits::{EventResult, OnMessageHandler},
|
||||
runtime::Runtime,
|
||||
},
|
||||
groups::leveling::constants::KEY_LEADERBOARD_MONTHLY,
|
||||
state::State,
|
||||
|
||||
+5
-1
@@ -111,7 +111,11 @@ pub fn u64_to_i64(u: u64) -> i64 {
|
||||
/// Returns:
|
||||
/// [`Option<(&str, &str)>`] - The splitted parts of the string, or [`None`] if no occurrences of
|
||||
/// `pattern` were found in `s`.
|
||||
pub fn split_at_nth_from_end<'a, 'b>(s: &'a str, pattern: &'b str, n: usize) -> Option<(&'a str, &'a str)> {
|
||||
pub fn split_at_nth_from_end<'a, 'b>(
|
||||
s: &'a str,
|
||||
pattern: &'b str,
|
||||
n: usize,
|
||||
) -> Option<(&'a str, &'a str)> {
|
||||
let mut end = s.len();
|
||||
let mut count = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user