Add code of conduct button and fix invalid display names
This commit is contained in:
@@ -1914,7 +1914,7 @@ impl<'a> Object<'a> for Participant {
|
||||
|
||||
fn make_name_valid(name: String) -> String {
|
||||
if name.len() == 1 {
|
||||
format!("{name}⠀⠀") // Add two invisible characters
|
||||
format!("{name}-")
|
||||
} else if name.len() > 80 {
|
||||
format!("{name:.80}")
|
||||
} else {
|
||||
|
||||
@@ -3,16 +3,14 @@ use async_trait::async_trait;
|
||||
use crate::{
|
||||
extras::Extras,
|
||||
framework::commands::{
|
||||
Command, CommandError,
|
||||
arguments::{Arg, Argument, NeedyString, ParseArguments},
|
||||
context::CommandContext,
|
||||
arguments::{Arg, Argument, NeedyString, ParseArguments}, context::CommandContext, Command, CommandError
|
||||
},
|
||||
groups::about::{
|
||||
groups::{about::{
|
||||
components::{
|
||||
HelpDonateLinkButton, HelpGoBackButton, HelpSupportLinkButton, HelpWebsiteLinkButton,
|
||||
},
|
||||
embeds::{get_all_command_help_embed, get_command_help_embed, get_command_not_found_embed},
|
||||
},
|
||||
}, calls::components::CodeOfConductButton},
|
||||
state::State,
|
||||
};
|
||||
|
||||
@@ -65,6 +63,7 @@ impl Command<State, Extras> for HelpCommand {
|
||||
.component(HelpWebsiteLinkButton, 1)
|
||||
.component(HelpSupportLinkButton, 1)
|
||||
.component(HelpDonateLinkButton, 1)
|
||||
.component(CodeOfConductButton, 1)
|
||||
.await?;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user