Update help and info commands to look better.

Remove hardcoded author name
This commit is contained in:
Agatha Rose 2020-05-05 04:07:08 +03:00
parent 6064e661ba
commit 4f1b628108
1 changed files with 19 additions and 17 deletions

View File

@ -507,28 +507,28 @@ fn help(ctx: &mut Context, message: &Message) -> CommandResult {
e.title("Availble commands:") e.title("Availble commands:")
.description("All commands are case-insensitive") .description("All commands are case-insensitive")
.fields(vec![ .fields(vec![
("owo init", "Introduce me", false), ("owo!init", "Introduce me", true),
("owo ping", "Pong", false), ("owo!ping", "Pong", true),
("owo sausage", "sosig", false), ("owo!sausage", "Sosig", true),
("owo help", "Help the fellow humanz!", false), ("owo!help", "Help the fellow humanz!", true),
("owo info", "Show information about me!", false), ("owo!info", "Show information about me!", true),
( (
"owo what's this ``word``", "owo!what's this ``word``",
"Find a definition of word", "Find a definition of word",
false, true,
), ),
( (
"owo embed ``[args]``", "owo!embed ``[args]``",
"Create an embed from a Toml object", "Create an embed from a Toml object",
false, true,
), ),
("owo ship ``[names]``", "*shipping intensifies*", false), ("owo!ship ``[names]``", "*Shipping intensifies*", true),
("owo headpat ``name``", "Headpat someone", false), ("owo!headpat ``name``", "Headpat someone", true),
("owo owo ``text``", "owoify input text", false), ("owo!owo ``text``", "owoify input text", true),
("\u{200B}", "**Admin commands:**", false), ("\u{200B}", "**Admin commands:**", false),
("owo halt", "kill me", false), ("owo!halt", "Kill the bot process", true),
("owo list_srv", "list my servers", false), ("owo!list_srv", "List my servers", true),
("owo host", "Display host info", false), ("owo!host", "Display host info", true),
]) ])
.color(0xffd1dc) .color(0xffd1dc)
}) })
@ -544,15 +544,17 @@ fn info(ctx: &mut Context, message: &Message, args: Args) -> CommandResult {
} }
let num = ctx.cache.read().guilds.len(); let num = ctx.cache.read().guilds.len();
let aganame = OWNERS.clone()[0].to_user(ctx.http.clone()).unwrap().tag();
let _ = message.channel_id.send_message(&ctx.http, |m| m let _ = message.channel_id.send_message(&ctx.http, |m| m
.embed(|e| e .embed(|e| e
.title("Discordinator9000's info:") .title("Discordinator9000's info:")
.field("Author:", "Ahtågä lrig etüc#9000 / Agatha", false) .field("Author:", format!("{} / Agatha", aganame), false)
.field("Server count:", num , false) .field("Server count:", num , false)
.field("Invite:", "[Invite link](https://discordapp.com/api/oauth2/authorize?client_id=470350233419907129&permissions=2048&scope=bot)", false ) .field("Invite:", "[Invite link](https://discordapp.com/api/oauth2/authorize?client_id=470350233419907129&permissions=2048&scope=bot)", false )
.footer(|f| f .footer(|f| f
.text("Written in Rust using Serenity, OwOify and a few other libraries")) .text("Written in Rust using Serenity, OwOify and a few other libraries"))
.color(0xee657) .thumbnail("https://cdn.discordapp.com/attachments/687011390434967621/704118007563157544/discordinator.png")
.color(0xffd1dc)
)); ));
Ok(()) Ok(())
} }