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::{
|
||||
framework::standard::{
|
||||
help_commands,
|
||||
macros::{group, help},
|
||||
Args, CommandGroup, CommandResult, HelpOptions, StandardFramework,
|
||||
},
|
||||
|
@ -46,12 +45,33 @@ struct General;
|
|||
fn my_help(
|
||||
context: &mut Context,
|
||||
msg: &Message,
|
||||
args: Args,
|
||||
_args: Args,
|
||||
help_options: &'static HelpOptions,
|
||||
groups: &[&'static CommandGroup],
|
||||
owners: HashSet<UserId>,
|
||||
_groups: &[&'static CommandGroup],
|
||||
_owners: HashSet<UserId>,
|
||||
) -> 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<()> {
|
||||
|
|
Loading…
Reference in a new issue