Change join-time option type to INTEGER

Adjusted the option type for 'join-time' from NUMBER to INTEGER for clarity and accuracy. This ensures proper data representation and aligns with intended usage.
This commit is contained in:
Teriuihi 2024-08-26 20:25:04 +02:00
parent f2864ade8a
commit 34f9559d10

View File

@ -31,7 +31,7 @@ public class CommandStaffJoinDate extends DiscordCommand {
public CommandStaffJoinDate(JDA jda, CommandManager commandManager) {
this.commandData = Commands.slash(getName(), "View join date for staff members, or add them manually")
.addOption(OptionType.MENTIONABLE, "staff", "The staff member to set/check the join date for", false, false)
.addOption(OptionType.NUMBER, "join-time", "The join date to set", false, false)
.addOption(OptionType.INTEGER, "join-time", "The join date to set", false, false)
.setDefaultPermissions(DefaultMemberPermissions.enabledFor(Permission.ADMINISTRATOR))
.setGuildOnly(true);
@ -54,6 +54,7 @@ public class CommandStaffJoinDate extends DiscordCommand {
interactionHook.editOriginalEmbeds(getFullStaffEmbed()).queue();
return;
}
Member member = staff.getAsMember();
if (member == null) {
interactionHook.editOriginalEmbeds(Util.genericErrorEmbed("Invalid member", String.format("%s is not a valid member", staff.getAsMentionable().getAsMention()))).queue();