Add code of conduct button and fix invalid display names

This commit is contained in:
2025-08-24 21:32:59 -03:00
parent 0f5f390d68
commit a75fd9f092
2 changed files with 5 additions and 6 deletions
+1 -1
View File
@@ -1914,7 +1914,7 @@ impl<'a> Object<'a> for Participant {
fn make_name_valid(name: String) -> String { fn make_name_valid(name: String) -> String {
if name.len() == 1 { if name.len() == 1 {
format!("{name}⠀⠀") // Add two invisible characters format!("{name}-")
} else if name.len() > 80 { } else if name.len() > 80 {
format!("{name:.80}") format!("{name:.80}")
} else { } else {
+4 -5
View File
@@ -3,16 +3,14 @@ use async_trait::async_trait;
use crate::{ use crate::{
extras::Extras, extras::Extras,
framework::commands::{ framework::commands::{
Command, CommandError, arguments::{Arg, Argument, NeedyString, ParseArguments}, context::CommandContext, Command, CommandError
arguments::{Arg, Argument, NeedyString, ParseArguments},
context::CommandContext,
}, },
groups::about::{ groups::{about::{
components::{ components::{
HelpDonateLinkButton, HelpGoBackButton, HelpSupportLinkButton, HelpWebsiteLinkButton, 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},
state::State, state::State,
}; };
@@ -65,6 +63,7 @@ impl Command<State, Extras> for HelpCommand {
.component(HelpWebsiteLinkButton, 1) .component(HelpWebsiteLinkButton, 1)
.component(HelpSupportLinkButton, 1) .component(HelpSupportLinkButton, 1)
.component(HelpDonateLinkButton, 1) .component(HelpDonateLinkButton, 1)
.component(CodeOfConductButton, 1)
.await?; .await?;
} }