Skip to content

Commit

Permalink
Sort events by their creation date
Browse files Browse the repository at this point in the history
  • Loading branch information
MrPowerGamerBR committed Dec 19, 2024
1 parent a15f74e commit 2b020ce
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ class EventCommand(val loritta: LorittaBot) : SlashCommandDeclarationWrapper {
.filter {
it.createEventTitle(context.i18nContext).startsWith(context.event.focusedOption.value, true)
}
.sortedBy { it.startsAt }
.take(25)

reactionEvents.associate {
Expand Down Expand Up @@ -661,6 +662,7 @@ class EventCommand(val loritta: LorittaBot) : SlashCommandDeclarationWrapper {
.filter {
it.createEventTitle(context.i18nContext).startsWith(context.event.focusedOption.value, true)
}
.sortedBy { it.startsAt }
.take(25)

reactionEvents.associate {
Expand Down

0 comments on commit 2b020ce

Please sign in to comment.