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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -17,7 +17,7 @@ import java.util.Arrays;
import java.util.LinkedList;
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.List;
public class MagicBallCommand implements MessageCommand
public class MessageMagicBallCommand implements MessageCommand
{
@Override

View File

@@ -13,7 +13,7 @@ import java.util.Collections;
import java.util.LinkedList;
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.List;
public class TimeoutCommand implements MessageCommand
public class MessageTimeoutCommand implements MessageCommand
{
@Override

View File

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

View File

@@ -17,7 +17,7 @@ import java.io.IOException;
import java.util.LinkedList;
import java.util.List;
public class UrbanDictionaryCommand implements MessageCommand
public class MessageUrbanDictionaryCommand implements MessageCommand
{
@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.commands.SlashCommandImpl;
public class AvatarCommand extends SlashCommandImpl
public class SlashAvatarCommand extends SlashCommandImpl
{
@Override
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.objects.commands.SlashCommandImpl;
public class BanCommand extends SlashCommandImpl
public class SlashBanCommand extends SlashCommandImpl
{
@Override
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.commands.SlashCommandImpl;
public class BannerCommand extends SlashCommandImpl
public class SlashBannerCommand extends SlashCommandImpl
{
@Override
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.objects.commands.SlashCommandImpl;
public class ClearCommand extends SlashCommandImpl
public class SlashClearCommand extends SlashCommandImpl
{
@Override

View File

@@ -7,7 +7,7 @@ import org.jetbrains.annotations.NotNull;
import wtf.beatrice.hidekobot.commands.base.CoinFlip;
import wtf.beatrice.hidekobot.objects.commands.SlashCommandImpl;
public class CoinFlipCommand extends SlashCommandImpl
public class SlashCoinFlipCommand extends SlashCommandImpl
{
@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.commands.SlashCommandImpl;
public class DiceRollCommand extends SlashCommandImpl
public class SlashDiceRollCommand extends SlashCommandImpl
{
@Override
public CommandData getSlashCommandData()

View File

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

View File

@@ -8,7 +8,7 @@ import org.jetbrains.annotations.NotNull;
import wtf.beatrice.hidekobot.Cache;
import wtf.beatrice.hidekobot.objects.commands.SlashCommandImpl;
public class HelpCommand extends SlashCommandImpl
public class SlashHelpCommand extends SlashCommandImpl
{
@Override
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.objects.commands.SlashCommandImpl;
public class InviteCommand extends SlashCommandImpl
public class SlashInviteCommand extends SlashCommandImpl
{
@Override

View File

@@ -10,7 +10,7 @@ import org.jetbrains.annotations.NotNull;
import wtf.beatrice.hidekobot.commands.base.UserPunishment;
import wtf.beatrice.hidekobot.objects.commands.SlashCommandImpl;
public class KickCommand extends SlashCommandImpl
public class SlashKickCommand extends SlashCommandImpl
{
@Override
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.objects.commands.SlashCommandImpl;
public class LoveCalculatorCommand extends SlashCommandImpl
public class SlashLoveCalculatorCommand extends SlashCommandImpl
{
@Override
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.objects.commands.SlashCommandImpl;
public class MagicBallCommand extends SlashCommandImpl
public class SlashMagicBallCommand extends SlashCommandImpl
{
@Override
public CommandData getSlashCommandData()

View File

@@ -6,7 +6,7 @@ import net.dv8tion.jda.api.interactions.commands.build.Commands;
import org.jetbrains.annotations.NotNull;
import wtf.beatrice.hidekobot.objects.commands.SlashCommandImpl;
public class PingCommand extends SlashCommandImpl
public class SlashPingCommand extends SlashCommandImpl
{
@Override
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.objects.commands.SlashCommandImpl;
public class SayCommand extends SlashCommandImpl
public class SlashSayCommand extends SlashCommandImpl
{
@Override
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.objects.commands.SlashCommandImpl;
public class TimeoutCommand extends SlashCommandImpl
public class SlashTimeoutCommand extends SlashCommandImpl
{
@Override
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.commands.SlashCommandImpl;
public class TriviaCommand extends SlashCommandImpl
public class SlashTriviaCommand extends SlashCommandImpl
{
@Override
public CommandData getSlashCommandData()

View File

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