Fixed some minor typos
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
This commit is contained in:
parent
23c842a2ac
commit
306e72403c
@ -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<Event> 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());
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user