Skip to content

Commit 1786843

Browse files
committed
Change time format in forms
1 parent ed3b3d3 commit 1786843

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/main/java/net/discordjug/javabot/systems/staff_commands/forms/FormInteractionManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public class FormInteractionManager implements ButtonHandler, ModalHandler {
4646
/**
4747
* String representation of the date and time format used in forms.
4848
*/
49-
public static final String DATE_FORMAT_STRING = "dd/MM/yyyy HH:mm";
49+
public static final String DATE_FORMAT_STRING = "dd.MM.yyyy HH:mm";
5050

5151
/**
5252
* Date and time formatter used in forms.

src/main/java/net/discordjug/javabot/systems/staff_commands/forms/model/FormData.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
import net.discordjug.javabot.systems.staff_commands.forms.FormInteractionManager;
1212
import net.dv8tion.jda.api.components.label.Label;
13+
import net.dv8tion.jda.api.modals.Modal;
1314

1415
/**
1516
* Class containing information about a form.
@@ -43,8 +44,8 @@ public record FormData(long id, List<FormField> fields, String title, long submi
4344
public FormData {
4445
Objects.requireNonNull(title);
4546
fields = List.copyOf(fields);
46-
if (fields.size() > 5) {
47-
throw new IllegalArgumentException("fields.size() > 5");
47+
if (fields.size() > Modal.MAX_COMPONENTS) {
48+
throw new IllegalArgumentException("fields.size() > " + Modal.MAX_COMPONENTS);
4849
}
4950
}
5051

0 commit comments

Comments
 (0)