Skip to content

Commit 0291813

Browse files
committed
style: run spotlessApply gradle task
1 parent 7b42e6a commit 0291813

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

application/src/main/java/org/togetherjava/tjbot/config/RoleApplicationSystemConfig.java

+9-4
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,13 @@
99
* Represents the configuration for an application form, including roles and application channel
1010
* pattern.
1111
*
12-
* @param submissionsChannelPattern the pattern used to identify the submissions channel where applications are sent
12+
* @param submissionsChannelPattern the pattern used to identify the submissions channel where
13+
* applications are sent
1314
* @param defaultQuestion the default question that will be asked in the role application form
1415
* @param minimumAnswerLength the minimum number of characters required for the applicant's answer
1516
* @param maximumAnswerLength the maximum number of characters allowed for the applicant's answer
16-
* @param applicationSubmitCooldownMinutes the cooldown time in minutes before the user can submit another application
17+
* @param applicationSubmitCooldownMinutes the cooldown time in minutes before the user can submit
18+
* another application
1719
*/
1820
public record RoleApplicationSystemConfig(
1921
@JsonProperty(value = "submissionsChannelPattern",
@@ -28,14 +30,17 @@ public record RoleApplicationSystemConfig(
2830
* Constructs an instance of {@link RoleApplicationSystemConfig} with the provided parameters.
2931
* <p>
3032
* This constructor ensures that {@code submissionsChannelPattern} and {@code defaultQuestion}
31-
* are not null and that the length of the {@code defaultQuestion} does not exceed the maximum allowed length.
33+
* are not null and that the length of the {@code defaultQuestion} does not exceed the maximum
34+
* allowed length.
3235
*/
3336
public RoleApplicationSystemConfig {
3437
Objects.requireNonNull(submissionsChannelPattern);
3538
Objects.requireNonNull(defaultQuestion);
3639

3740
if (defaultQuestion.length() > TextInput.MAX_LABEL_LENGTH) {
38-
throw new IllegalArgumentException("defaultQuestion length is too long! Cannot be greater than %d".formatted(TextInput.MAX_LABEL_LENGTH));
41+
throw new IllegalArgumentException(
42+
"defaultQuestion length is too long! Cannot be greater than %d"
43+
.formatted(TextInput.MAX_LABEL_LENGTH));
3944
}
4045
}
4146
}

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

-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
* users to prevent spamming.
3030
*/
3131
public class ApplicationApplyHandler {
32-
3332
private final Cache<Member, OffsetDateTime> applicationSubmitCooldown;
3433
private final Predicate<String> applicationChannelPattern;
3534
private final RoleApplicationSystemConfig roleApplicationSystemConfig;

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

+2-6
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020
import net.dv8tion.jda.api.interactions.components.text.TextInput;
2121
import net.dv8tion.jda.api.interactions.components.text.TextInputStyle;
2222
import net.dv8tion.jda.api.interactions.modals.Modal;
23-
import org.slf4j.Logger;
24-
import org.slf4j.LoggerFactory;
2523

2624
import org.togetherjava.tjbot.config.Config;
2725
import org.togetherjava.tjbot.config.RoleApplicationSystemConfig;
@@ -44,8 +42,6 @@
4442
* guild.
4543
*/
4644
public class ApplicationCreateCommand extends SlashCommandAdapter {
47-
private static final Logger logger = LoggerFactory.getLogger(ApplicationCreateCommand.class);
48-
4945
protected static final Color AMBIENT_COLOR = new Color(24, 221, 136, 255);
5046
private static final int OPTIONAL_ROLES_AMOUNT = 5;
5147
private static final String ROLE_COMPONENT_ID_HEADER = "application-create";
@@ -135,8 +131,8 @@ public void onStringSelectSelection(StringSelectInteractionEvent event, List<Str
135131
}
136132

137133
TextInput body = TextInput
138-
.create(generateComponentId(event.getUser().getId()), roleApplicationSystemConfig.defaultQuestion(),
139-
TextInputStyle.PARAGRAPH)
134+
.create(generateComponentId(event.getUser().getId()),
135+
roleApplicationSystemConfig.defaultQuestion(), TextInputStyle.PARAGRAPH)
140136
.setRequired(true)
141137
.setRequiredRange(roleApplicationSystemConfig.minimumAnswerLength(),
142138
roleApplicationSystemConfig.maximumAnswerLength())

0 commit comments

Comments
 (0)