fix rozvrh a suplovani

This commit is contained in:
Daniel Bulant 2021-12-22 08:35:28 +01:00
parent 3c3c2ee3c5
commit e4c7ba2396
2 changed files with 2 additions and 1 deletions

View file

@ -73,7 +73,7 @@ module.exports = class rozvrh extends commando.Command {
for(const scell of cells) {
embed.addField(scell.subject.abbrev, `\`${api.formatRoom(scell.roomId) || "?"}\` - ${scell.teacher.name} - **${scell.group.name}**`, cells.length > 1);
}
if(cells.length > 1 && schedule[cellI + 1].length > 1) embed.addField("\u200B", "\u200B", true);
if(cells.length > 1 && schedule[cellI + 1]?.length > 1) embed.addField("\u200B", "\u200B", true);
}
return msg.say(embed);

View file

@ -34,6 +34,7 @@ module.exports = class suplovani extends commando.Command {
if(!changes.has(t.Hour)) changes.set(t.Hour, []);
changes.set(t.Hour, [...changes.get(t.Hour), `(\`${t.Subject}\`) **${t.ChgType1}** ${t.Group ? "(sk. " + t.Group + ")" : ""} ${t.Room ? "v `" + api.formatRoom(t.Room) + "`" : ""}`]);
}
if(!change.Class.Abbrev) continue;
embed.addField(change.Class.Abbrev,
[...changes.entries()].map(t => `**${t[0]}**. h.: ${t[1].map(t => t.trim()).join("; ")}`) || "Žádná změna",
true