From 306e72403cd6cae92e5befbcaf2e0a542225b6f4 Mon Sep 17 00:00:00 2001 From: Louis Vallat Date: Fri, 16 Apr 2021 15:59:36 +0200 Subject: [PATCH] Fixed some minor typos Signed-off-by: Louis Vallat --- app/src/main/java/xyz/vallat/louis/commands/Edt.java | 8 ++++---- .../xyz/vallat/louis/managers/database/EventManager.java | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/xyz/vallat/louis/commands/Edt.java b/app/src/main/java/xyz/vallat/louis/commands/Edt.java index 9610f56..9924413 100644 --- a/app/src/main/java/xyz/vallat/louis/commands/Edt.java +++ b/app/src/main/java/xyz/vallat/louis/commands/Edt.java @@ -14,7 +14,7 @@ import java.util.List; public class Edt extends Command { public Edt(String name) { - super(name, "Récupère tes 5 prochaines cours (si tu en as 5 ou plus).", name); + super(name, "Récupère (au maximum) tes 5 prochaines cours.", name); } @Override @@ -27,10 +27,10 @@ public class Edt extends Command { return messageChannel.createMessage("On dirait que tu n'es pas dans ma base de données ! Es tu inscrit ?"); return messageChannel.createEmbed(e -> { List events = EventManager.getNextEventsFromStudent(s); - if (events.size() >= 5) events = events.subList(0, 5); + if (events.size() > 5) events = events.subList(0, 5); e.setTitle("Prochains cours") - .setFooter("Liste des 5 prochains cours", null) - .setDescription("Voici tes 5 prochains cours, <@!" + s.getSnowflake() + "> :") + .setFooter("Liste des " + events.size() + " prochains cours", null) + .setDescription("Voici tes " + events.size() + " prochains cours, <@!" + s.getSnowflake() + "> :") .setColor(Color.GREEN); events.forEach(ev -> e.addField(ev.getStartEvent().toString(), ev.getSummary(), false)); e.setTimestamp(Instant.now()); diff --git a/app/src/main/java/xyz/vallat/louis/managers/database/EventManager.java b/app/src/main/java/xyz/vallat/louis/managers/database/EventManager.java index 149df0a..bd7e09f 100644 --- a/app/src/main/java/xyz/vallat/louis/managers/database/EventManager.java +++ b/app/src/main/java/xyz/vallat/louis/managers/database/EventManager.java @@ -36,10 +36,10 @@ public final class EventManager { connection.rollback(); } else { try { - logger.debug("'{}' events reimported, commiting.", importedEvents); + logger.debug("'{}' events re-imported, committing.", importedEvents); connection.commit(); } catch (SQLException e) { - logger.error("An SQLExcetpion occured, rolling back.", e); + logger.error("An SQLException occurred, rolling back.", e); connection.rollback(); } }