Register help command
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Bea 2022-11-21 15:13:32 +01:00
parent 78d5bd6beb
commit 24bb560d93
2 changed files with 13 additions and 1 deletions

View File

@ -1,7 +1,9 @@
package wtf.beatrice.hidekobot.commands.slash;
import net.dv8tion.jda.api.EmbedBuilder;
import net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent;
import org.jetbrains.annotations.NotNull;
import wtf.beatrice.hidekobot.Configuration;
public class HelpCommand
{
@ -11,6 +13,15 @@ public class HelpCommand
// defer reply because replying might take a while
event.deferReply().queue();
event.reply("Pong!").queue();
EmbedBuilder embedBuilder = new EmbedBuilder();
// embed processing
{
embedBuilder.setColor(Configuration.getBotColor());
embedBuilder.setTitle("Help");
}
event.getHook().editOriginalEmbeds(embedBuilder.build()).queue();
}
}

View File

@ -17,6 +17,7 @@ public class SlashCommandListener extends ListenerAdapter
case "clear" -> new ClearChatCommand().runSlashCommand(event);
case "coinflip" -> new CoinFlipCommand().runSlashCommand(event);
case "die" -> new DieCommand().runSlashCommand(event);
case "help" -> new HelpCommand().runSlashCommand(event);
case "invite" -> new InviteCommand().runSlashCommand(event);
case "ping" -> new PingCommand().runSlashCommand(event);
}