Skip to content

Commit

Permalink
Merge pull request #519 from beanbeanjuice/518-make-birthday-timezone…
Browse files Browse the repository at this point in the history
…-readable

Made Birthday Timezone Readable
  • Loading branch information
beanbeanjuice authored Sep 4, 2022
2 parents 53dc13e + 61ce1fc commit 9301c14
Showing 1 changed file with 1 addition and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import net.dv8tion.jda.api.interactions.commands.OptionType;
import net.dv8tion.jda.api.interactions.commands.build.OptionData;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.ArrayList;

Expand Down Expand Up @@ -69,20 +68,6 @@ public void handle(@NotNull SlashCommandInteractionEvent event) {
}
}

/**
* Gets the {@link BirthdayMonth} from a {@link String}.
* @param month The {@link String} to parse.
* @return The parsed {@link BirthdayMonth}. Null, if there is an error.
*/
@Nullable
private BirthdayMonth getBirthdayMonth(@NotNull String month) {
for (BirthdayMonth birthdayMonth : BirthdayMonth.values()) {
if (birthdayMonth.toString().equalsIgnoreCase(month))
return birthdayMonth;
}
return null;
}

@NotNull
@Override
public String getDescription() {
Expand Down Expand Up @@ -115,7 +100,7 @@ public ArrayList<OptionData> getOptions() {
options.add(new OptionData(OptionType.INTEGER, "day", "The day you were born in the specified month!", true)
.setRequiredRange(1, 31));

OptionData timeZoneOptions = new OptionData(OptionType.STRING, "timezone", "The timezone you are in! Start typing to see available options!", true, true);
OptionData timeZoneOptions = new OptionData(OptionType.STRING, "timezone", "Start typing to see available options!", true, true);

options.add(timeZoneOptions);
return options;
Expand Down

0 comments on commit 9301c14

Please sign in to comment.