Custom help
This commit is contained in:
parent
17d4a3e02a
commit
07effa2257
1 changed files with 25 additions and 5 deletions
30
src/main.rs
30
src/main.rs
|
@ -11,7 +11,6 @@ mod player;
|
||||||
|
|
||||||
use serenity::{
|
use serenity::{
|
||||||
framework::standard::{
|
framework::standard::{
|
||||||
help_commands,
|
|
||||||
macros::{group, help},
|
macros::{group, help},
|
||||||
Args, CommandGroup, CommandResult, HelpOptions, StandardFramework,
|
Args, CommandGroup, CommandResult, HelpOptions, StandardFramework,
|
||||||
},
|
},
|
||||||
|
@ -46,12 +45,33 @@ struct General;
|
||||||
fn my_help(
|
fn my_help(
|
||||||
context: &mut Context,
|
context: &mut Context,
|
||||||
msg: &Message,
|
msg: &Message,
|
||||||
args: Args,
|
_args: Args,
|
||||||
help_options: &'static HelpOptions,
|
help_options: &'static HelpOptions,
|
||||||
groups: &[&'static CommandGroup],
|
_groups: &[&'static CommandGroup],
|
||||||
owners: HashSet<UserId>,
|
_owners: HashSet<UserId>,
|
||||||
) -> CommandResult {
|
) -> CommandResult {
|
||||||
help_commands::with_embeds(context, msg, args, &help_options, groups, owners)
|
msg.channel_id.send_message(&context.http, |m| {
|
||||||
|
m.embed(|embed| {
|
||||||
|
embed.colour(help_options.embed_success_colour);
|
||||||
|
|
||||||
|
embed.field("General", "ip", true);
|
||||||
|
embed.field("General", "help", true);
|
||||||
|
|
||||||
|
embed.field("Audio Control", "play", true);
|
||||||
|
embed.field("Audio Control", "pause", true);
|
||||||
|
embed.field("Audio Control", "stop", true);
|
||||||
|
embed.field("Audio Control", "skip", true);
|
||||||
|
|
||||||
|
embed.field("Data Manipulation", "list", true);
|
||||||
|
embed.field("Data Manipulation", "remove", true);
|
||||||
|
embed.field("Data Manipulation", "tag", true);
|
||||||
|
|
||||||
|
embed
|
||||||
|
});
|
||||||
|
m
|
||||||
|
})?;
|
||||||
|
|
||||||
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn main() -> Result<()> {
|
fn main() -> Result<()> {
|
||||||
|
|
Loading…
Reference in a new issue