mirror of
https://github.com/DreamExposure/DisCal-Discord-Bot.git
synced 2026-05-08 02:10:05 -05:00
Get events command fully working without emitting no cal message
This commit is contained in:
+3
-2
@@ -126,7 +126,7 @@ public class EventListCommand implements Command {
|
||||
.flatMap(e -> EventMessageFormatter.getCondensedEventEmbed(e,
|
||||
data.getCalendarNumber(), settings).flatMap(embed ->
|
||||
Messages.sendMessage(embed, event)))
|
||||
.then());
|
||||
.then()).thenReturn(GlobalConst.NOT_EMPTY);
|
||||
}
|
||||
})
|
||||
).switchIfEmpty(Messages.sendMessage(Messages.getMessage("Creator.Calendar.NoCalendar", settings), event));
|
||||
@@ -163,7 +163,8 @@ public class EventListCommand implements Command {
|
||||
return Messages.sendMessage(Messages.getMessage("Event.List.Found.Many", "%amount%",
|
||||
events.size() + "", settings), event).then(Flux.fromIterable(events).flatMap(e ->
|
||||
EventMessageFormatter.getCondensedEventEmbed(e, data.getCalendarNumber(), settings)
|
||||
.flatMap(embed -> Messages.sendMessage(embed, event))).then());
|
||||
.flatMap(embed -> Messages.sendMessage(embed, event))).then())
|
||||
.thenReturn(GlobalConst.NOT_EMPTY);
|
||||
}
|
||||
});
|
||||
}).switchIfEmpty(Messages.sendMessage(Messages.getMessage("Creator.Calendar.NoCalendar", settings), event));
|
||||
|
||||
@@ -52,4 +52,6 @@ public class GlobalConst {
|
||||
public static final long oneDayMs = 86400000;
|
||||
|
||||
public static final MediaType JSON = MediaType.parse("application/json; charset=utf-8");
|
||||
|
||||
public static final String NOT_EMPTY = "Not empty"; //Used for returning in mono's that we don't want to be empty.
|
||||
}
|
||||
Reference in New Issue
Block a user