Slowly progressing through monthly recurrence options

This commit is contained in:
NovaFox161
2026-01-24 11:32:56 -06:00
parent 0aa59588fe
commit 0e36fc21d8
3 changed files with 23 additions and 0 deletions

View File

@@ -613,6 +613,8 @@ class EventCommand(
}
EventRecurrence.Frequency.MONTHLY -> {
TODO("Not yet implemented")
// Show dropdown with wizard to ask "on specific day of month (ex 15th)", or "Nth day of month (ex first Tuesday)"
// On selection, modal should be popped for either
}
EventRecurrence.Frequency.YEARLY -> {
TODO("Not yet implemented")

View File

@@ -88,4 +88,18 @@ class ComponentService {
return arrayOf(Label.of(getCommonMsg("select.event.recurrence.days.label", settings.locale), select))
}
fun getEventRecurrenceMonthlyDropdownComponents(settings: GuildSettings, event: Event.PartialEvent): Array<LayoutComponent> {
// dropdown with wizard to ask "on specific day of month (ex 15th)", or "Nth day of month (ex first Tuesday)"
val dateOption = SelectMenu.Option.of(getCommonMsg("select.event.recurrence.month.option.date.label", settings.locale), "monthly_date")
.withDescription(getCommonMsg("select.event.recurrence.month.option.date.description", settings.locale))
.withDefault(true) // Default behavior of monthly recurrence
val variableOption = SelectMenu.Option.of(getCommonMsg("select.event.recurrence.month.option.variable.label", settings.locale), "monthly_variable")
.withDescription(getCommonMsg("select.event.recurrence.month.option.variable.description", settings.locale))
val selectMenu = SelectMenu.of("select.event.recurrence.month-option", dateOption, variableOption)
.withPlaceholder(getCommonMsg("select.event.recurrence.month.placeholder", settings.locale))
return arrayOf(ActionRow.of(selectMenu))
}
}

View File

@@ -50,9 +50,16 @@ dropdown.rsvp.response.unexpected-option=The selected option was not recognized,
# Event Recurrence menus
select.event.recurrence.days.label=Days of Week
select.event.recurrence.month.label=Monthly Recurrence Options
select.event.recurrence.month.placeholder=Select how the event should recur every month
select.event.recurrence.month.option.date.label=Specific day number
select.event.recurrence.month.option.date.description=Recur on a specific day number of the month (ex. the 1st of every month)
select.event.recurrence.month.option.variable.label=Nth *day of month
select.event.recurrence.month.option.variable.description=Recur on a variable day of the month (ex. the first Tuesday)
modal.event-recurrence.day-of-week.title=Select days for event to recur
modal.event-recurrence.day-of-week.success=Event will now recur weekly on the selected day(s)
# Wizard buttons
button.wizard.confirm.create.label=Create
button.wizard.confirm.edit.label=Confirm Changes