Skip to content

Commit 32ab146

Browse files
Moved subcommands out of their package and renamed them accordingly
1 parent b15b90c commit 32ab146

File tree

4 files changed

+8
-11
lines changed

4 files changed

+8
-11
lines changed

src/main/java/net/javadiscord/javabot/systems/help/commands/subcommands/HelpAccountSubcommand.java renamed to src/main/java/net/javadiscord/javabot/systems/help/commands/HelpAccountSubcommand.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package net.javadiscord.javabot.systems.help.commands.subcommands;
1+
package net.javadiscord.javabot.systems.help.commands;
22

33
import com.dynxsty.dih4jda.interactions.commands.SlashCommand;
44
import net.dv8tion.jda.api.EmbedBuilder;

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22

33
import com.dynxsty.dih4jda.interactions.commands.SlashCommand;
44
import net.dv8tion.jda.api.interactions.commands.build.Commands;
5-
import net.javadiscord.javabot.systems.help.commands.subcommands.HelpAccountSubcommand;
6-
import net.javadiscord.javabot.systems.help.commands.subcommands.HelpGuidelinesCommand;
7-
import net.javadiscord.javabot.systems.help.commands.subcommands.HelpPingCommand;
85

96
/**
107
* Represents the `/help` command. This holds commands related to the help system.
@@ -17,6 +14,6 @@ public HelpCommand() {
1714
setSlashCommandData(Commands.slash("help", "Commands related to the help system.")
1815
.setGuildOnly(true)
1916
);
20-
addSubcommands(new HelpAccountSubcommand(), new HelpPingCommand(), new HelpGuidelinesCommand());
17+
addSubcommands(new HelpAccountSubcommand(), new HelpPingSubcommand(), new HelpGuidelinesSubcommand());
2118
}
2219
}

src/main/java/net/javadiscord/javabot/systems/help/commands/subcommands/HelpGuidelinesCommand.java renamed to src/main/java/net/javadiscord/javabot/systems/help/commands/HelpGuidelinesSubcommand.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package net.javadiscord.javabot.systems.help.commands.subcommands;
1+
package net.javadiscord.javabot.systems.help.commands;
22

33
import com.dynxsty.dih4jda.interactions.commands.SlashCommand;
44
import net.dv8tion.jda.api.EmbedBuilder;
@@ -16,11 +16,11 @@
1616
/**
1717
* Shows the server's help-guidelines.
1818
*/
19-
public class HelpGuidelinesCommand extends SlashCommand.Subcommand {
19+
public class HelpGuidelinesSubcommand extends SlashCommand.Subcommand {
2020
/**
2121
* The constructor of this class, which sets the corresponding {@link net.dv8tion.jda.api.interactions.commands.build.SlashCommandData}.
2222
*/
23-
public HelpGuidelinesCommand() {
23+
public HelpGuidelinesSubcommand() {
2424
setSubcommandData(new SubcommandData("guidelines", "Show the server's help guidelines in a simple format."));
2525
}
2626

src/main/java/net/javadiscord/javabot/systems/help/commands/subcommands/HelpPingCommand.java renamed to src/main/java/net/javadiscord/javabot/systems/help/commands/HelpPingSubcommand.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package net.javadiscord.javabot.systems.help.commands.subcommands;
1+
package net.javadiscord.javabot.systems.help.commands;
22

33
import com.dynxsty.dih4jda.interactions.commands.SlashCommand;
44
import net.dv8tion.jda.api.EmbedBuilder;
@@ -22,7 +22,7 @@
2222
* Handler for the /help ping sub-command that allows users to occasionally ping
2323
* helpers.
2424
*/
25-
public class HelpPingCommand extends SlashCommand.Subcommand {
25+
public class HelpPingSubcommand extends SlashCommand.Subcommand {
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

@@ -31,7 +31,7 @@ public class HelpPingCommand extends SlashCommand.Subcommand {
3131
/**
3232
* Constructor that initializes and handles the cooldown map.
3333
*/
34-
public HelpPingCommand() {
34+
public HelpPingSubcommand() {
3535
setSubcommandData(new SubcommandData("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);

0 commit comments

Comments
 (0)