Someone forgot to update help again

This commit is contained in:
Agatha Rose 2020-06-04 17:55:11 +03:00
parent 7a143614eb
commit 49c4c57f94
No known key found for this signature in database
GPG Key ID: 3F9F2317B3D5C3AC
1 changed files with 9 additions and 9 deletions

View File

@ -531,6 +531,7 @@ fn help(ctx: &mut Context, message: &Message) -> CommandResult {
"Display channel's Nth pinned message", "Display channel's Nth pinned message",
true, true,
), ),
("owo!brainfuck ``input``", "execute input code", true),
("owo!ship ``[names]``", "*Shipping intensifies*", true), ("owo!ship ``[names]``", "*Shipping intensifies*", true),
("owo!headpat ``name``", "Headpat someone", true), ("owo!headpat ``name``", "Headpat someone", true),
("owo!owo ``text``", "owoify input text", true), ("owo!owo ``text``", "owoify input text", true),
@ -695,8 +696,8 @@ fn brainfuck(ctx: &mut Context, message: &Message, args: Args) -> CommandResult
let input = match args.rest().trim() { let input = match args.rest().trim() {
"" => { "" => {
return Err(CommandError("Empty input!".to_string())); return Err(CommandError("Empty input!".to_string()));
}, }
v @ _ => v v @ _ => v,
}; };
let output = Brainfuck::execute(input); let output = Brainfuck::execute(input);
@ -705,9 +706,10 @@ fn brainfuck(ctx: &mut Context, message: &Message, args: Args) -> CommandResult
let _ = message.channel_id.send_message(&ctx.http, |m| { let _ = message.channel_id.send_message(&ctx.http, |m| {
m.embed(|e| { m.embed(|e| {
e.title("Brainfuck interpreter") e.title("Brainfuck interpreter")
.description( .description(format!(
format!("Input\n```brainfuck\n{}\n```\nOutput:\n```{}\n```", input, v) "Input\n```brainfuck\n{}\n```\nOutput:\n```{}\n```",
) input, v
))
.author(|a| { .author(|a| {
a.name(&message.author.name) a.name(&message.author.name)
.icon_url(message.author.avatar_url().unwrap()) .icon_url(message.author.avatar_url().unwrap())
@ -715,14 +717,12 @@ fn brainfuck(ctx: &mut Context, message: &Message, args: Args) -> CommandResult
.colour(0xffd1dc) .colour(0xffd1dc)
}) })
}); });
}, }
Err(err) => { Err(err) => {
let _ = message.channel_id.send_message(&ctx.http, |m| { let _ = message.channel_id.send_message(&ctx.http, |m| {
m.embed(|e| { m.embed(|e| {
e.title("Brainfuck interpreter") e.title("Brainfuck interpreter")
.description( .description(format!("Error at:\n```\n{}:{}\n```", err.line(), err.col()))
format!("Error at:\n```\n{}:{}\n```", err.line(), err.col())
)
.author(|a| { .author(|a| {
a.name(&message.author.name) a.name(&message.author.name)
.icon_url(message.author.avatar_url().unwrap()) .icon_url(message.author.avatar_url().unwrap())