Fix link cal command error

This commit is contained in:
NovaFox161
2021-10-06 17:14:53 -05:00
parent 3f897c8384
commit 48bf609714

View File

@@ -17,7 +17,7 @@ class LinkCalendarCommand : SlashCommand {
override val ephemeral = false
override fun handle(event: ChatInputInteractionEvent, settings: GuildSettings): Mono<Message> {
val calendarNumber = event.options[0].getOption("calendar")
val calendarNumber = event.getOption("calendar")
.flatMap(ApplicationCommandInteractionOption::getValue)
.map(ApplicationCommandInteractionOptionValue::asLong)
.map(Long::toInt)