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",
true,
),
("owo!brainfuck ``input``", "execute input code", true),
("owo!ship ``[names]``", "*Shipping intensifies*", true),
("owo!headpat ``name``", "Headpat someone", 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() {
"" => {
return Err(CommandError("Empty input!".to_string()));
},
v @ _ => v
}
v @ _ => v,
};
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| {
m.embed(|e| {
e.title("Brainfuck interpreter")
.description(
format!("Input\n```brainfuck\n{}\n```\nOutput:\n```{}\n```", input, v)
)
.description(format!(
"Input\n```brainfuck\n{}\n```\nOutput:\n```{}\n```",
input, v
))
.author(|a| {
a.name(&message.author.name)
.icon_url(message.author.avatar_url().unwrap())
@ -715,14 +717,12 @@ fn brainfuck(ctx: &mut Context, message: &Message, args: Args) -> CommandResult
.colour(0xffd1dc)
})
});
},
}
Err(err) => {
let _ = message.channel_id.send_message(&ctx.http, |m| {
m.embed(|e| {
e.title("Brainfuck interpreter")
.description(
format!("Error at:\n```\n{}:{}\n```", err.line(), err.col())
)
.description(format!("Error at:\n```\n{}:{}\n```", err.line(), err.col()))
.author(|a| {
a.name(&message.author.name)
.icon_url(message.author.avatar_url().unwrap())