Skip to content

Commit c51c9ff

Browse files
committed
refactor: rename to CreateRoleApplicationCommand
Rename the command to match the package name that this class is located in. Primarily for organizational purposes and to not come up with differnt names every time we reference this feature. Suggested-by: Zabuzard <zabuza.dev@gmail.com> Signed-off-by: Chris Sdogkos <work@chris-sdogkos.com>
1 parent 3fb788a commit c51c9ff

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

application/src/main/java/org/togetherjava/tjbot/features/Features.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
import org.togetherjava.tjbot.features.projects.ProjectsThreadCreatedListener;
6767
import org.togetherjava.tjbot.features.reminder.RemindRoutine;
6868
import org.togetherjava.tjbot.features.reminder.ReminderCommand;
69-
import org.togetherjava.tjbot.features.roleapplication.ApplicationCreateCommand;
69+
import org.togetherjava.tjbot.features.roleapplication.CreateRoleApplicationCommand;
7070
import org.togetherjava.tjbot.features.system.BotCore;
7171
import org.togetherjava.tjbot.features.system.LogLevelCommand;
7272
import org.togetherjava.tjbot.features.tags.TagCommand;
@@ -198,7 +198,7 @@ public static Collection<Feature> createFeatures(JDA jda, Database database, Con
198198
features.add(new BookmarksCommand(bookmarksSystem));
199199
features.add(new ChatGptCommand(chatGptService, helpSystemHelper));
200200
features.add(new JShellCommand(jshellEval));
201-
features.add(new ApplicationCreateCommand(config));
201+
features.add(new CreateRoleApplicationCommand(config));
202202

203203
FeatureBlacklist<Class<?>> blacklist = blacklistConfig.normal();
204204
return blacklist.filterStream(features.stream(), Object::getClass).toList();

application/src/main/java/org/togetherjava/tjbot/features/roleapplication/ApplicationApplyHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ protected void sendApplicationResult(final ModalInteractionEvent event, List<Str
7979
User applicant = event.getUser();
8080
EmbedBuilder embed =
8181
new EmbedBuilder().setAuthor(applicant.getName(), null, applicant.getAvatarUrl())
82-
.setColor(ApplicationCreateCommand.AMBIENT_COLOR)
82+
.setColor(CreateRoleApplicationCommand.AMBIENT_COLOR)
8383
.setTimestamp(Instant.now())
8484
.setFooter("Submitted at");
8585

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
* This command is designed to generate an application form for members to apply for roles within a
4242
* guild.
4343
*/
44-
public class ApplicationCreateCommand extends SlashCommandAdapter {
44+
public class CreateRoleApplicationCommand extends SlashCommandAdapter {
4545
protected static final Color AMBIENT_COLOR = new Color(24, 221, 136, 255);
4646
private static final int OPTIONAL_ROLES_AMOUNT = 5;
4747
private static final String ROLE_COMPONENT_ID_HEADER = "application-create";
@@ -54,13 +54,13 @@ public class ApplicationCreateCommand extends SlashCommandAdapter {
5454
private final RoleApplicationSystemConfig roleApplicationSystemConfig;
5555

5656
/**
57-
* Constructs a new {@link ApplicationCreateCommand} with the specified configuration.
57+
* Constructs a new {@link CreateRoleApplicationCommand} with the specified configuration.
5858
* <p>
5959
* This command is designed to generate an application form for members to apply for roles.
6060
*
6161
* @param config the configuration containing the settings for the application form
6262
*/
63-
public ApplicationCreateCommand(Config config) {
63+
public CreateRoleApplicationCommand(Config config) {
6464
super("application-form", "Generates an application form for members to apply for roles.",
6565
CommandVisibility.GUILD);
6666

application/src/main/java/org/togetherjava/tjbot/features/roleapplication/package-info.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* This packages offers all the functionality for the application-create command as well as the
33
* application system. The core class is
4-
* {@link org.togetherjava.tjbot.features.roleapplication.ApplicationCreateCommand}.
4+
* {@link org.togetherjava.tjbot.features.roleapplication.CreateRoleApplicationCommand}.
55
*/
66
@MethodsReturnNonnullByDefault
77
@ParametersAreNonnullByDefault

0 commit comments

Comments
 (0)