Update help command

Rewrite ship compatibility bar code
This commit is contained in:
Agatha 2020-04-03 02:58:00 +03:00
parent 5867137555
commit 195a2be3b4
1 changed files with 7 additions and 18 deletions

View File

@ -315,19 +315,8 @@ fn ship(ctx: &mut Context, message: &Message, args: Args) -> CommandResult {
let compat: u64 = StdRng::seed_from_u64(calculate_hash(&names)).gen_range(50, 100);
// Initialize a bar to display compatibility percentage
let mut compbar = String::new();
let mut num = 0;
while num < compat / 10 {
compbar.push('▬');
num += 1;
}
compbar.push_str(":purple_heart:");
num = 0;
while num < (10 - compat / 10) {
compbar.push('▬');
num += 1;
}
let mut compbar = String::from("----------");
compbar.insert_str((compat / 10) as usize, ":purple_heart:");
// Convert names to a Vec<String>
let names = names
@ -485,17 +474,17 @@ fn help(ctx: &mut Context, message: &Message) -> CommandResult {
"Find a definition of word",
false,
),
(
"owo embed ``[args]``",
"Create an embed from a Toml object",
false,
),
("owo ship ``[names]``", "*shipping intensifies*", false),
("owo headpat ``name``", "Headpat someone", false),
("owo owo ``text``", "owoify input text", false),
("\u{200B}", "**Admin commands:**", false),
("owo halt", "kill me", false),
("owo list_srv", "list my servers", false),
(
"owo embed ``[args]``",
"Create an embed from a Toml object",
false,
),
("owo host", "Display host info", false),
])
.color(0xffd1dc)