Calendar.js does not wait for the calendar to be fully downloaded before parsing it
Calendar.js does not wait for the calendar to be fully downloaded before parsing it
Current Behavior
In discord-bot/controllers/calendar.js
, inside the init()
function:
downloadCalendar(calendarDownloadURL);
If downloading the calendar takes too long, the program might go on to the next instructions which require the calendar file before it is fully downloaded. This should be addressed as it can cause the bot to crash.
Possible Implementation
Make sure the calendar dowload is finished before going to the next instructions.
Edited by Amad Salmon