Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] aviso con mensaje random para los dias feriados #51

Merged
merged 16 commits into from
Jun 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ class Bot extends Client {
next_class_embed = this.embeds.get(
'nextFaceToFaceClass'
) as EmbedPage;
} else if (event.summary.includes('Holiday')) {
} else if (event.summary.toLowerCase().includes('holiday')) {
next_class_embed = this.embeds.get('holiday') as EmbedPage;
} else {
this.logger.error(`Invalid class type.`);
Expand Down
6 changes: 3 additions & 3 deletions src/components/embed_pages/FaceToFaceClassInfoEmbedPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,19 @@ export const data = new EmbedPage(
},
{
name: 'Temas a ver',
value: event.summary.includes('Holiday')
value: event.summary.toLowerCase().includes('holiday')
? 'NO HAY CLASES'
: extractTopicsFromEventDescription(event.description),
},
{
name: 'Ejercicio a tener entregado',
value: event.summary.includes('Holiday')
value: event.summary.toLowerCase().includes('holiday')
? 'NO HAY CLASES'
: extractExercisesFromEventDescription(event.description),
},
{
name: 'Paper a tener leído',
value: event.summary.includes('Holiday')
value: event.summary.toLowerCase().includes('holiday')
? 'NO HAY CLASES'
: extractLecturesFromEventDescription(event.description) +
'\n*Para encontrar el link a un paper podés hacerlo desde ' +
Expand Down
6 changes: 3 additions & 3 deletions src/components/embed_pages/VirtualClassInfoEmbedPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,19 @@ export const data = new EmbedPage(
},
{
name: 'Temas a ver',
value: event.summary.includes('Holiday')
value: event.summary.toLowerCase().includes('holiday')
? 'NO HAY CLASES'
: extractTopicsFromEventDescription(event.description),
},
{
name: 'Ejercicio a tener entregado',
value: event.summary.includes('Holiday')
value: event.summary.toLowerCase().includes('holiday')
? 'NO HAY CLASES'
: extractExercisesFromEventDescription(event.description),
},
{
name: 'Paper a tener leído',
value: event.summary.includes('Holiday')
value: event.summary.toLowerCase().includes('holiday')
? 'NO HAY CLASES'
: extractLecturesFromEventDescription(event.description) +
'\n*Para encontrar el link a un paper podés hacerlo desde ' +
Expand Down