File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
src/main/java/net/javadiscord/javabot/systems/help/commands Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change 1+ package net .javadiscord .javabot .systems .help .commands ;
2+
3+ import net .dv8tion .jda .api .interactions .commands .OptionType ;
4+ import net .dv8tion .jda .api .interactions .commands .build .Commands ;
5+
6+ /**
7+ * A simple command that can be used inside reserved help channels to immediately unreserve them,
8+ * instead of waiting for a timeout.
9+ */
10+ public class CloseCommand extends UnreserveCommand {
11+
12+ /**
13+ * The constructor of this class, which sets the corresponding
14+ * {@link net.dv8tion.jda.api.interactions.commands.build.SlashCommandData}.
15+ */
16+ public CloseCommand () {
17+ setSlashCommandData (
18+ Commands .slash ("close" , "Unreserves this help channel so that others can use it." )
19+ .setGuildOnly (true ).addOption (OptionType .STRING , "reason" ,
20+ "The reason why you're unreserving this channel" , false ));
21+ }
22+ }
You can’t perform that action at this time.
0 commit comments