Skip to content

Commit ab2c5d3

Browse files
committed
Fixed /help-ping not being registered
1 parent 7920d0c commit ab2c5d3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/net/javadiscord/javabot/systems/help/commands/HelpPingCommand.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import net.dv8tion.jda.api.EmbedBuilder;
55
import net.dv8tion.jda.api.entities.*;
66
import net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent;
7-
import net.dv8tion.jda.api.interactions.commands.build.SubcommandData;
7+
import net.dv8tion.jda.api.interactions.commands.build.Commands;
88
import net.javadiscord.javabot.Bot;
99
import net.javadiscord.javabot.data.config.GuildConfig;
1010
import net.javadiscord.javabot.data.config.guild.HelpConfig;
@@ -22,7 +22,7 @@
2222
* Handler for the /help-ping command that allows users to occasionally ping
2323
* helpers.
2424
*/
25-
public class HelpPingCommand extends SlashCommand.Subcommand {
25+
public class HelpPingCommand extends SlashCommand {
2626
private static final String WRONG_CHANNEL_MSG = "This command can only be used in **reserved help channels**.";
2727
private static final long CACHE_CLEANUP_DELAY = 60L;
2828

@@ -32,7 +32,7 @@ public class HelpPingCommand extends SlashCommand.Subcommand {
3232
* Constructor that initializes and handles the cooldown map.
3333
*/
3434
public HelpPingCommand() {
35-
setSubcommandData(new SubcommandData("help-ping", "Notify those with the help-ping role that your question is urgent."));
35+
setSlashCommandData(Commands.slash("help-ping", "Notify those with the help-ping role that your question is urgent."));
3636
lastPingTimes = new ConcurrentHashMap<>();
3737
Bot.getAsyncPool().scheduleWithFixedDelay(this::cleanTimeoutCache, CACHE_CLEANUP_DELAY, CACHE_CLEANUP_DELAY, TimeUnit.SECONDS);
3838
}

0 commit comments

Comments
 (0)