From 07effa2257ef903cafc2af260dc50b4dcbbfe111 Mon Sep 17 00:00:00 2001 From: hodasemi Date: Wed, 4 May 2022 19:33:29 +0200 Subject: [PATCH] Custom help --- src/main.rs | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/src/main.rs b/src/main.rs index ed5585e..4e8a089 100644 --- a/src/main.rs +++ b/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, + _groups: &[&'static CommandGroup], + _owners: HashSet, ) -> 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<()> {