Enhances student laziness by automatically posting classroom announcements and assignments through a Discord Webhook.
- Create a Script App Project https://script.google.com/
- Follow the guide on installing
clasphttps://github.com/google/clasp - Clone this git locally
git clone https://github.com/NathanAdhitya/gclassroom-discord.git - Create a .clasp.json, fill in with
{"scriptId": "your script id here"}, replace "your script id here" with script id obtained by going toFile > Project Properties > Info - Push the project to google apps script using
clasp push - Follow the Project Setup Guide
- You're done.
- Set webhook link in
File > Project properties > Script properties. Property:discordWebhook, insert discord webhook link as value. - Enable Google Classroom API in
Resources > Advanced Google Services - If you have not, create a per-minute execution by going to
Edit > Current project's triggers - Create a new trigger
-
Function to run: run Choose which deployment should run: Head Select event source: Time-driven Select type of time based trigger: Minutes timer Select minute interval: Every minute Failure notification settings: Notify me daily - Save the trigger. This will execute the script every minute.
- Follow the Self-Deploy guide, with the project setup guide being optional.
- After cloning, use
npm installto install all dependencies. - If you are using Visual Studio Code, make sure you have the TSLint plugin and Jest plugin.
- If you wish to keep your google apps script in sync, you can use
clasp push --watch - You can now start editing and testing.
