File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -229,11 +229,11 @@ async function filterToadaysEvents(
229
229
if ( thisWeeksEvents [ entry ] . day == today . getDay ( ) ) {
230
230
var event = thisWeeksEvents [ entry ]
231
231
var summary = event . summary
232
- //extract the subject after the "-" in the string
233
- var subject = summary . split ( "-" ) [ 1 ]
232
+ //extract the subject after the first "-" in the string
233
+ var subject = summary . split ( / - ( . + ) / ) [ 1 ]
234
234
235
235
//extract the professors Name before the "-" in the string
236
- var professor = summary . split ( "-" ) [ 0 ]
236
+ var professor = summary . split ( / - ( . + ) / ) [ 0 ]
237
237
238
238
var link = extractZoomLinks ( event . description )
239
239
@@ -466,7 +466,7 @@ function createCron(
466
466
( _channel ) => _channel == channel
467
467
) as TextChannel
468
468
notificationChannel
469
- ?. send ( { content : role , embeds : [ embed . setTimestamp ( ) ] } )
469
+ ?. send ( { content : role || null , embeds : [ embed . setTimestamp ( ) ] } )
470
470
. then ( ( msg ) => {
471
471
setTimeout ( function ( ) {
472
472
try {
You can’t perform that action at this time.
0 commit comments