Register clear command
This commit is contained in:
parent
f2dc70569d
commit
bfb4aae2aa
@ -1,7 +1,10 @@
|
|||||||
package wtf.beatrice.hidekobot.utils;
|
package wtf.beatrice.hidekobot.utils;
|
||||||
|
|
||||||
import net.dv8tion.jda.api.JDA;
|
import net.dv8tion.jda.api.JDA;
|
||||||
|
import net.dv8tion.jda.api.Permission;
|
||||||
import net.dv8tion.jda.api.interactions.commands.Command;
|
import net.dv8tion.jda.api.interactions.commands.Command;
|
||||||
|
import net.dv8tion.jda.api.interactions.commands.DefaultMemberPermissions;
|
||||||
|
import net.dv8tion.jda.api.interactions.commands.OptionType;
|
||||||
import net.dv8tion.jda.api.interactions.commands.build.CommandData;
|
import net.dv8tion.jda.api.interactions.commands.build.CommandData;
|
||||||
import net.dv8tion.jda.api.interactions.commands.build.Commands;
|
import net.dv8tion.jda.api.interactions.commands.build.Commands;
|
||||||
import wtf.beatrice.hidekobot.HidekoBot;
|
import wtf.beatrice.hidekobot.HidekoBot;
|
||||||
@ -19,6 +22,9 @@ public class SlashCommandsUtil
|
|||||||
{{
|
{{
|
||||||
add(Commands.slash("ping", "Test if the bot is responsive."));
|
add(Commands.slash("ping", "Test if the bot is responsive."));
|
||||||
add(Commands.slash("coinflip", "Flip a coin and get head or tails."));
|
add(Commands.slash("coinflip", "Flip a coin and get head or tails."));
|
||||||
|
add(Commands.slash("clear", "Clear the current channel's chat.")
|
||||||
|
.addOption(OptionType.INTEGER, "amount", "The amount of messages to delete.")
|
||||||
|
.setDefaultPermissions(DefaultMemberPermissions.enabledFor(Permission.MESSAGE_MANAGE)));
|
||||||
}};
|
}};
|
||||||
|
|
||||||
public static void updateSlashCommands()
|
public static void updateSlashCommands()
|
||||||
|
Loading…
Reference in New Issue
Block a user