Pretty shabby email/discord bot written in JS. I built this to save the inconvenience of looking at google drive for schedules.
Special thanks to Aidan.
The school I go to groups classes into flexible 'blocks' of time. These 'blocks' of time are prone to change everyday and they are published on a google sheets. Instead of actually visiting the sheets page everyday, why not just send it/email it to you?
Even if not meant to be reused, I'll admit that the code here is not 100% reusable since a lot of things were special cases when I was scraping the schedules.
- Node.JS (v10.10.0) [https://nodejs.org/en/]
- discord.js (v11.3.2) [https://discord.js.org/#/]
- cheerio (v1.0.0-rc.2) [https://cheerio.js.org/]
- moment (v2.22.2) [https://momentjs.com/]
- nodemailer (v.4.6.8) [https://nodemailer.com/about/]
- request-promise (v4.2.2) [https://github.com/request/request-promise]
- sinon (v.6.2.0) [https://sinonjs.org/]
- Add a different good morning message everyday
- Parse extra data in the schedule so formatting looks nice
- Add some screenshots
- Credit dependencies
- Add more comments
- 'Forecast' of tomorrow's schedule
Formatting still leaves a lot to be desired
Example of what my bot parses
-
I use the Prettier code formatter for js (default settings from the vs-code extension except for line width set to 100).