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