rename command classes
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-09-06 21:47:23 +02:00
parent 5ad1d9e891
commit eafa80f1d2
32 changed files with 80 additions and 70 deletions

View File

@@ -11,11 +11,21 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.system.ApplicationHome; import org.springframework.boot.system.ApplicationHome;
import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.ConfigurableApplicationContext;
import wtf.beatrice.hidekobot.commands.completer.ProfileImageCommandCompleter; import wtf.beatrice.hidekobot.commands.completer.ProfileImageCommandCompleter;
import wtf.beatrice.hidekobot.commands.message.MessageAliasCommand; import wtf.beatrice.hidekobot.commands.message.*;
import wtf.beatrice.hidekobot.commands.message.MessageBotInfoCommand;
import wtf.beatrice.hidekobot.commands.message.MessageHelloCommand;
import wtf.beatrice.hidekobot.commands.message.MessageHelpCommand;
import wtf.beatrice.hidekobot.commands.slash.*; import wtf.beatrice.hidekobot.commands.slash.*;
import wtf.beatrice.hidekobot.commands.slash.SlashBanCommand;
import wtf.beatrice.hidekobot.commands.slash.SlashBannerCommand;
import wtf.beatrice.hidekobot.commands.slash.SlashClearCommand;
import wtf.beatrice.hidekobot.commands.slash.SlashCoinFlipCommand;
import wtf.beatrice.hidekobot.commands.slash.SlashDiceRollCommand;
import wtf.beatrice.hidekobot.commands.slash.SlashInviteCommand;
import wtf.beatrice.hidekobot.commands.slash.SlashKickCommand;
import wtf.beatrice.hidekobot.commands.slash.SlashLoveCalculatorCommand;
import wtf.beatrice.hidekobot.commands.slash.SlashMagicBallCommand;
import wtf.beatrice.hidekobot.commands.slash.SlashSayCommand;
import wtf.beatrice.hidekobot.commands.slash.SlashTimeoutCommand;
import wtf.beatrice.hidekobot.commands.slash.SlashTriviaCommand;
import wtf.beatrice.hidekobot.commands.slash.SlashUrbanDictionaryCommand;
import wtf.beatrice.hidekobot.datasources.ConfigurationSource; import wtf.beatrice.hidekobot.datasources.ConfigurationSource;
import wtf.beatrice.hidekobot.datasources.PropertiesSource; import wtf.beatrice.hidekobot.datasources.PropertiesSource;
import wtf.beatrice.hidekobot.listeners.*; import wtf.beatrice.hidekobot.listeners.*;
@@ -153,50 +163,50 @@ public class HidekoBot
MessageCommandListener messageCommandListener = context.getBean(MessageCommandListener.class); MessageCommandListener messageCommandListener = context.getBean(MessageCommandListener.class);
ButtonInteractionListener buttonInteractionListener = context.getBean(ButtonInteractionListener.class); ButtonInteractionListener buttonInteractionListener = context.getBean(ButtonInteractionListener.class);
SelectMenuInteractionListener selectMenuInteractionListener = context.getBean(SelectMenuInteractionListener.class); SelectMenuInteractionListener selectMenuInteractionListener = context.getBean(SelectMenuInteractionListener.class);
AvatarCommand avatarCommand = new AvatarCommand(); SlashAvatarCommand slashAvatarCommand = new SlashAvatarCommand();
ProfileImageCommandCompleter avatarCommandCompleter = new ProfileImageCommandCompleter(avatarCommand); ProfileImageCommandCompleter avatarCommandCompleter = new ProfileImageCommandCompleter(slashAvatarCommand);
slashCommandListener.registerCommand(avatarCommand); slashCommandListener.registerCommand(slashAvatarCommand);
slashCommandCompletionListener.registerCommandCompleter(avatarCommandCompleter); slashCommandCompletionListener.registerCommandCompleter(avatarCommandCompleter);
slashCommandListener.registerCommand(new BanCommand()); slashCommandListener.registerCommand(new SlashBanCommand());
BannerCommand bannerCommand = new BannerCommand(); SlashBannerCommand slashBannerCommand = new SlashBannerCommand();
ProfileImageCommandCompleter bannerCommandCompleter = new ProfileImageCommandCompleter(bannerCommand); ProfileImageCommandCompleter bannerCommandCompleter = new ProfileImageCommandCompleter(slashBannerCommand);
slashCommandListener.registerCommand(bannerCommand); slashCommandListener.registerCommand(slashBannerCommand);
slashCommandCompletionListener.registerCommandCompleter(bannerCommandCompleter); slashCommandCompletionListener.registerCommandCompleter(bannerCommandCompleter);
slashCommandListener.registerCommand(context.getBean(SlashBotInfoCommand.class)); slashCommandListener.registerCommand(context.getBean(SlashBotInfoCommand.class));
slashCommandListener.registerCommand(new ClearCommand()); slashCommandListener.registerCommand(new SlashClearCommand());
slashCommandListener.registerCommand(new CoinFlipCommand()); slashCommandListener.registerCommand(new SlashCoinFlipCommand());
slashCommandListener.registerCommand(new DiceRollCommand()); slashCommandListener.registerCommand(new SlashDiceRollCommand());
slashCommandListener.registerCommand(new DieCommand()); slashCommandListener.registerCommand(new SlashDieCommand());
slashCommandListener.registerCommand(new HelpCommand()); slashCommandListener.registerCommand(new SlashHelpCommand());
slashCommandListener.registerCommand(new InviteCommand()); slashCommandListener.registerCommand(new SlashInviteCommand());
slashCommandListener.registerCommand(new KickCommand()); slashCommandListener.registerCommand(new SlashKickCommand());
slashCommandListener.registerCommand(new LoveCalculatorCommand()); slashCommandListener.registerCommand(new SlashLoveCalculatorCommand());
slashCommandListener.registerCommand(new MagicBallCommand()); slashCommandListener.registerCommand(new SlashMagicBallCommand());
slashCommandListener.registerCommand(new PingCommand()); slashCommandListener.registerCommand(new SlashPingCommand());
slashCommandListener.registerCommand(new SayCommand()); slashCommandListener.registerCommand(new SlashSayCommand());
slashCommandListener.registerCommand(new TimeoutCommand()); slashCommandListener.registerCommand(new SlashTimeoutCommand());
slashCommandListener.registerCommand(new TriviaCommand()); slashCommandListener.registerCommand(new SlashTriviaCommand());
slashCommandListener.registerCommand(new UrbanDictionaryCommand()); slashCommandListener.registerCommand(new SlashUrbanDictionaryCommand());
// register message commands // register message commands
messageCommandListener.registerCommand(new MessageHelloCommand()); messageCommandListener.registerCommand(new MessageHelloCommand());
messageCommandListener.registerCommand(context.getBean(MessageAliasCommand.class)); messageCommandListener.registerCommand(context.getBean(MessageAliasCommand.class));
messageCommandListener.registerCommand(new wtf.beatrice.hidekobot.commands.message.AvatarCommand()); messageCommandListener.registerCommand(new MessageAvatarCommand());
messageCommandListener.registerCommand(new wtf.beatrice.hidekobot.commands.message.BanCommand()); messageCommandListener.registerCommand(new MessageBanCommand());
messageCommandListener.registerCommand(new wtf.beatrice.hidekobot.commands.message.BannerCommand()); messageCommandListener.registerCommand(new MessageBannerCommand());
messageCommandListener.registerCommand(context.getBean(MessageBotInfoCommand.class)); messageCommandListener.registerCommand(context.getBean(MessageBotInfoCommand.class));
messageCommandListener.registerCommand(new wtf.beatrice.hidekobot.commands.message.CoinFlipCommand()); messageCommandListener.registerCommand(new MessageCoinFlipCommand());
messageCommandListener.registerCommand(new wtf.beatrice.hidekobot.commands.message.ClearCommand()); messageCommandListener.registerCommand(new MessageClearCommand());
messageCommandListener.registerCommand(new wtf.beatrice.hidekobot.commands.message.DiceRollCommand()); messageCommandListener.registerCommand(new MessageDiceRollCommand());
messageCommandListener.registerCommand(context.getBean(MessageHelpCommand.class)); messageCommandListener.registerCommand(context.getBean(MessageHelpCommand.class));
messageCommandListener.registerCommand(new wtf.beatrice.hidekobot.commands.message.InviteCommand()); messageCommandListener.registerCommand(new MessageInviteCommand());
messageCommandListener.registerCommand(new wtf.beatrice.hidekobot.commands.message.KickCommand()); messageCommandListener.registerCommand(new MessageKickCommand());
messageCommandListener.registerCommand(new wtf.beatrice.hidekobot.commands.message.LoveCalculatorCommand()); messageCommandListener.registerCommand(new MessageLoveCalculatorCommand());
messageCommandListener.registerCommand(new wtf.beatrice.hidekobot.commands.message.MagicBallCommand()); messageCommandListener.registerCommand(new MessageMagicBallCommand());
messageCommandListener.registerCommand(new wtf.beatrice.hidekobot.commands.message.SayCommand()); messageCommandListener.registerCommand(new MessageSayCommand());
messageCommandListener.registerCommand(new wtf.beatrice.hidekobot.commands.message.TimeoutCommand()); messageCommandListener.registerCommand(new MessageTimeoutCommand());
messageCommandListener.registerCommand(new wtf.beatrice.hidekobot.commands.message.TriviaCommand()); messageCommandListener.registerCommand(new MessageTriviaCommand());
messageCommandListener.registerCommand(new wtf.beatrice.hidekobot.commands.message.UrbanDictionaryCommand()); messageCommandListener.registerCommand(new MessageUrbanDictionaryCommand());
// register listeners // register listeners
Cache.setSlashCommandListener(slashCommandListener); Cache.setSlashCommandListener(slashCommandListener);

View File

@@ -16,7 +16,7 @@ import java.util.Collections;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.List; import java.util.List;
public class AvatarCommand implements MessageCommand public class MessageAvatarCommand implements MessageCommand
{ {
@Override @Override

View File

@@ -13,7 +13,7 @@ import java.util.Collections;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.List; import java.util.List;
public class BanCommand implements MessageCommand public class MessageBanCommand implements MessageCommand
{ {
@Override @Override

View File

@@ -16,7 +16,7 @@ import java.util.Collections;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.List; import java.util.List;
public class BannerCommand implements MessageCommand public class MessageBannerCommand implements MessageCommand
{ {
@Override @Override

View File

@@ -15,7 +15,7 @@ import java.util.Collections;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.List; import java.util.List;
public class ClearCommand implements MessageCommand public class MessageClearCommand implements MessageCommand
{ {
@Override @Override

View File

@@ -12,7 +12,7 @@ import java.util.Arrays;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.List; import java.util.List;
public class CoinFlipCommand implements MessageCommand public class MessageCoinFlipCommand implements MessageCommand
{ {
@Override @Override

View File

@@ -13,7 +13,7 @@ import java.util.Arrays;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.List; import java.util.List;
public class DiceRollCommand implements MessageCommand public class MessageDiceRollCommand implements MessageCommand
{ {
@Override @Override
public LinkedList<String> getCommandLabels() public LinkedList<String> getCommandLabels()

View File

@@ -15,7 +15,7 @@ import java.util.Collections;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.List; import java.util.List;
public class InviteCommand implements MessageCommand public class MessageInviteCommand implements MessageCommand
{ {
@Override @Override

View File

@@ -13,7 +13,7 @@ import java.util.Collections;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.List; import java.util.List;
public class KickCommand implements MessageCommand public class MessageKickCommand implements MessageCommand
{ {
@Override @Override

View File

@@ -17,7 +17,7 @@ import java.util.Arrays;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.List; import java.util.List;
public class LoveCalculatorCommand implements MessageCommand public class MessageLoveCalculatorCommand implements MessageCommand
{ {

View File

@@ -11,7 +11,7 @@ import wtf.beatrice.hidekobot.objects.commands.MessageCommand;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.List; import java.util.List;
public class MagicBallCommand implements MessageCommand public class MessageMagicBallCommand implements MessageCommand
{ {
@Override @Override

View File

@@ -13,7 +13,7 @@ import java.util.Collections;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.List; import java.util.List;
public class SayCommand implements MessageCommand public class MessageSayCommand implements MessageCommand
{ {

View File

@@ -13,7 +13,7 @@ import java.util.Collections;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.List; import java.util.List;
public class TimeoutCommand implements MessageCommand public class MessageTimeoutCommand implements MessageCommand
{ {
@Override @Override

View File

@@ -19,7 +19,7 @@ import java.util.LinkedList;
import java.util.List; import java.util.List;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
public class TriviaCommand implements MessageCommand public class MessageTriviaCommand implements MessageCommand
{ {
@Override @Override

View File

@@ -17,7 +17,7 @@ import java.io.IOException;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.List; import java.util.List;
public class UrbanDictionaryCommand implements MessageCommand public class MessageUrbanDictionaryCommand implements MessageCommand
{ {
@Override @Override

View File

@@ -11,7 +11,7 @@ import wtf.beatrice.hidekobot.commands.base.ProfileImage;
import wtf.beatrice.hidekobot.objects.MessageResponse; import wtf.beatrice.hidekobot.objects.MessageResponse;
import wtf.beatrice.hidekobot.objects.commands.SlashCommandImpl; import wtf.beatrice.hidekobot.objects.commands.SlashCommandImpl;
public class AvatarCommand extends SlashCommandImpl public class SlashAvatarCommand extends SlashCommandImpl
{ {
@Override @Override
public CommandData getSlashCommandData() public CommandData getSlashCommandData()

View File

@@ -10,7 +10,7 @@ import org.jetbrains.annotations.NotNull;
import wtf.beatrice.hidekobot.commands.base.UserPunishment; import wtf.beatrice.hidekobot.commands.base.UserPunishment;
import wtf.beatrice.hidekobot.objects.commands.SlashCommandImpl; import wtf.beatrice.hidekobot.objects.commands.SlashCommandImpl;
public class BanCommand extends SlashCommandImpl public class SlashBanCommand extends SlashCommandImpl
{ {
@Override @Override
public CommandData getSlashCommandData() public CommandData getSlashCommandData()

View File

@@ -11,7 +11,7 @@ import wtf.beatrice.hidekobot.commands.base.ProfileImage;
import wtf.beatrice.hidekobot.objects.MessageResponse; import wtf.beatrice.hidekobot.objects.MessageResponse;
import wtf.beatrice.hidekobot.objects.commands.SlashCommandImpl; import wtf.beatrice.hidekobot.objects.commands.SlashCommandImpl;
public class BannerCommand extends SlashCommandImpl public class SlashBannerCommand extends SlashCommandImpl
{ {
@Override @Override
public CommandData getSlashCommandData() public CommandData getSlashCommandData()

View File

@@ -13,7 +13,7 @@ import wtf.beatrice.hidekobot.Cache;
import wtf.beatrice.hidekobot.commands.base.ClearChat; import wtf.beatrice.hidekobot.commands.base.ClearChat;
import wtf.beatrice.hidekobot.objects.commands.SlashCommandImpl; import wtf.beatrice.hidekobot.objects.commands.SlashCommandImpl;
public class ClearCommand extends SlashCommandImpl public class SlashClearCommand extends SlashCommandImpl
{ {
@Override @Override

View File

@@ -7,7 +7,7 @@ import org.jetbrains.annotations.NotNull;
import wtf.beatrice.hidekobot.commands.base.CoinFlip; import wtf.beatrice.hidekobot.commands.base.CoinFlip;
import wtf.beatrice.hidekobot.objects.commands.SlashCommandImpl; import wtf.beatrice.hidekobot.objects.commands.SlashCommandImpl;
public class CoinFlipCommand extends SlashCommandImpl public class SlashCoinFlipCommand extends SlashCommandImpl
{ {
@Override @Override

View File

@@ -10,7 +10,7 @@ import wtf.beatrice.hidekobot.commands.base.DiceRoll;
import wtf.beatrice.hidekobot.objects.MessageResponse; import wtf.beatrice.hidekobot.objects.MessageResponse;
import wtf.beatrice.hidekobot.objects.commands.SlashCommandImpl; import wtf.beatrice.hidekobot.objects.commands.SlashCommandImpl;
public class DiceRollCommand extends SlashCommandImpl public class SlashDiceRollCommand extends SlashCommandImpl
{ {
@Override @Override
public CommandData getSlashCommandData() public CommandData getSlashCommandData()

View File

@@ -13,7 +13,7 @@ import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
public class DieCommand extends SlashCommandImpl public class SlashDieCommand extends SlashCommandImpl
{ {
@Override @Override
public CommandData getSlashCommandData() public CommandData getSlashCommandData()

View File

@@ -8,7 +8,7 @@ import org.jetbrains.annotations.NotNull;
import wtf.beatrice.hidekobot.Cache; import wtf.beatrice.hidekobot.Cache;
import wtf.beatrice.hidekobot.objects.commands.SlashCommandImpl; import wtf.beatrice.hidekobot.objects.commands.SlashCommandImpl;
public class HelpCommand extends SlashCommandImpl public class SlashHelpCommand extends SlashCommandImpl
{ {
@Override @Override
public CommandData getSlashCommandData() public CommandData getSlashCommandData()

View File

@@ -13,7 +13,7 @@ import org.jetbrains.annotations.NotNull;
import wtf.beatrice.hidekobot.commands.base.Invite; import wtf.beatrice.hidekobot.commands.base.Invite;
import wtf.beatrice.hidekobot.objects.commands.SlashCommandImpl; import wtf.beatrice.hidekobot.objects.commands.SlashCommandImpl;
public class InviteCommand extends SlashCommandImpl public class SlashInviteCommand extends SlashCommandImpl
{ {
@Override @Override

View File

@@ -10,7 +10,7 @@ import org.jetbrains.annotations.NotNull;
import wtf.beatrice.hidekobot.commands.base.UserPunishment; import wtf.beatrice.hidekobot.commands.base.UserPunishment;
import wtf.beatrice.hidekobot.objects.commands.SlashCommandImpl; import wtf.beatrice.hidekobot.objects.commands.SlashCommandImpl;
public class KickCommand extends SlashCommandImpl public class SlashKickCommand extends SlashCommandImpl
{ {
@Override @Override
public CommandData getSlashCommandData() public CommandData getSlashCommandData()

View File

@@ -11,7 +11,7 @@ import org.jetbrains.annotations.NotNull;
import wtf.beatrice.hidekobot.commands.base.LoveCalculator; import wtf.beatrice.hidekobot.commands.base.LoveCalculator;
import wtf.beatrice.hidekobot.objects.commands.SlashCommandImpl; import wtf.beatrice.hidekobot.objects.commands.SlashCommandImpl;
public class LoveCalculatorCommand extends SlashCommandImpl public class SlashLoveCalculatorCommand extends SlashCommandImpl
{ {
@Override @Override
public CommandData getSlashCommandData() public CommandData getSlashCommandData()

View File

@@ -10,7 +10,7 @@ import org.jetbrains.annotations.NotNull;
import wtf.beatrice.hidekobot.commands.base.MagicBall; import wtf.beatrice.hidekobot.commands.base.MagicBall;
import wtf.beatrice.hidekobot.objects.commands.SlashCommandImpl; import wtf.beatrice.hidekobot.objects.commands.SlashCommandImpl;
public class MagicBallCommand extends SlashCommandImpl public class SlashMagicBallCommand extends SlashCommandImpl
{ {
@Override @Override
public CommandData getSlashCommandData() public CommandData getSlashCommandData()

View File

@@ -6,7 +6,7 @@ import net.dv8tion.jda.api.interactions.commands.build.Commands;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import wtf.beatrice.hidekobot.objects.commands.SlashCommandImpl; import wtf.beatrice.hidekobot.objects.commands.SlashCommandImpl;
public class PingCommand extends SlashCommandImpl public class SlashPingCommand extends SlashCommandImpl
{ {
@Override @Override
public CommandData getSlashCommandData() public CommandData getSlashCommandData()

View File

@@ -11,7 +11,7 @@ import org.jetbrains.annotations.NotNull;
import wtf.beatrice.hidekobot.commands.base.Say; import wtf.beatrice.hidekobot.commands.base.Say;
import wtf.beatrice.hidekobot.objects.commands.SlashCommandImpl; import wtf.beatrice.hidekobot.objects.commands.SlashCommandImpl;
public class SayCommand extends SlashCommandImpl public class SlashSayCommand extends SlashCommandImpl
{ {
@Override @Override
public CommandData getSlashCommandData() public CommandData getSlashCommandData()

View File

@@ -10,7 +10,7 @@ import org.jetbrains.annotations.NotNull;
import wtf.beatrice.hidekobot.commands.base.UserPunishment; import wtf.beatrice.hidekobot.commands.base.UserPunishment;
import wtf.beatrice.hidekobot.objects.commands.SlashCommandImpl; import wtf.beatrice.hidekobot.objects.commands.SlashCommandImpl;
public class TimeoutCommand extends SlashCommandImpl public class SlashTimeoutCommand extends SlashCommandImpl
{ {
@Override @Override
public CommandData getSlashCommandData() public CommandData getSlashCommandData()

View File

@@ -11,7 +11,7 @@ import wtf.beatrice.hidekobot.commands.base.Trivia;
import wtf.beatrice.hidekobot.objects.MessageResponse; import wtf.beatrice.hidekobot.objects.MessageResponse;
import wtf.beatrice.hidekobot.objects.commands.SlashCommandImpl; import wtf.beatrice.hidekobot.objects.commands.SlashCommandImpl;
public class TriviaCommand extends SlashCommandImpl public class SlashTriviaCommand extends SlashCommandImpl
{ {
@Override @Override
public CommandData getSlashCommandData() public CommandData getSlashCommandData()

View File

@@ -17,7 +17,7 @@ import wtf.beatrice.hidekobot.objects.commands.SlashCommandImpl;
import java.io.IOException; import java.io.IOException;
public class UrbanDictionaryCommand extends SlashCommandImpl public class SlashUrbanDictionaryCommand extends SlashCommandImpl
{ {
@Override @Override
public CommandData getSlashCommandData() public CommandData getSlashCommandData()