Apply cargo fmt --all
This commit is contained in:
@@ -9,7 +9,10 @@ use twilight_util::builder::embed::{
|
||||
};
|
||||
|
||||
use crate::{
|
||||
constants::{COLOR_RED, COLOR_YELLOW}, discord::images, groups::calls::moderation::Rule, utils::ellipse,
|
||||
constants::{COLOR_RED, COLOR_YELLOW},
|
||||
discord::images,
|
||||
groups::calls::moderation::Rule,
|
||||
utils::ellipse,
|
||||
};
|
||||
|
||||
pub fn first_warning_embed(
|
||||
@@ -144,7 +147,7 @@ pub fn first_ban_embed(
|
||||
pub fn final_ban_embed(
|
||||
app: &Application,
|
||||
message: &Message,
|
||||
rules_broken: Vec<Arc<dyn Rule>>
|
||||
rules_broken: Vec<Arc<dyn Rule>>,
|
||||
) -> Embed {
|
||||
EmbedBuilder::new()
|
||||
.author(
|
||||
@@ -182,4 +185,4 @@ pub fn final_ban_embed(
|
||||
)
|
||||
.footer(EmbedFooterBuilder::new("You broke the rules 3 times."))
|
||||
.build()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,9 +5,9 @@ use twilight_validate::request::webhook_username;
|
||||
|
||||
use crate::discord::images;
|
||||
|
||||
pub mod commands;
|
||||
pub(super) mod components;
|
||||
pub(super) mod embeds;
|
||||
pub mod commands;
|
||||
pub mod events;
|
||||
pub(super) mod moderation;
|
||||
|
||||
|
||||
@@ -148,7 +148,7 @@ pub struct NormalizedMessage {
|
||||
}
|
||||
|
||||
/// Generates a normalized message out of the original message string.
|
||||
///
|
||||
///
|
||||
/// TODO: Replace * in the message with wildcards to match censored words.
|
||||
///
|
||||
/// Arguments:
|
||||
|
||||
+2
-2
@@ -56,11 +56,11 @@ pub trait Bye: Sized {
|
||||
impl<T> Bye for T {}
|
||||
|
||||
/// Trims a string to a maximum length, adding an ellipsis if it exceeds the limit.
|
||||
///
|
||||
///
|
||||
/// Arguments:
|
||||
/// * `string` - The string to trim with ellipse.
|
||||
/// * `max_length` - The max length the string may have.
|
||||
///
|
||||
///
|
||||
/// Returns:
|
||||
/// [`String`] - The trimmed string with an ellipsis if it exceeded the limit.
|
||||
pub fn ellipse(string: String, max_length: usize) -> String {
|
||||
|
||||
Reference in New Issue
Block a user