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:
parent
f2864ade8a
commit
34f9559d10
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user