Someone forgot to update help again
This commit is contained in:
parent
a732278e7b
commit
278d4e53f5
18
src/main.rs
18
src/main.rs
|
@ -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())
|
||||
|
|
Loading…
Reference in New Issue