- Fix Teambuilder website export to csv
- Discord.js documentation
- GitHUb REST API Documentation
- Skyra - Discord.js based bot for reference
- Prisma SQLite documentation
- .csv -> SQLite via CMD line -^^Adv Python Implementation ^^
Youtube Vids Thay might be helpful:
- GitHub API Tutorial | 2023
- Intro to Webhooks - Real Time App Automation (Discord Bot, Slack, GitHub)
- Building an API with Node.js, Express.js, and OctoKit Tutorial that talks to GitHub (low quality)
- Building a Discord Bot to Interact with the GitHub API - A Step-by-Step Guide! (low quality)
- Install these dependencies: (If having issues, follow the Setup Tutorial 1 video)
# discord.js - Discord API for JavaScript
npm install discord.js
# nodemon - For auto-updating the bot instead of needing to re-start it all the time
npm install -g nodemon
# dotenv - For making environment variables, added security
npm install dotenv
# @octokit/rest - For GitHub API
npm install octokit/rest
- After installing those dependencies, copy the SCIPE GitHub repository to your computer. Once done, add a new file called '.env' to use for storing IDs 2. Create three values as so:
TOKEN = <Bot Token>
GUILD_ID = <Server ID>
BOT_ID = <Bot ID>
- Once finished, open the VS code terminal (command prompt) and run
npm init -y. This will build the package.json file, open it and make sure it looks just like this:
{
"name": "scipe",
"version": "1.0.0",
"description": "S.C.I.P.E. Smart Computer Interface for Protocol Execution",
"main": "src/index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"discord.js": "^14.16.2",
"dotenv": "^16.4.5"
}
}
- Assuming everything is correct, the bot should startup when you run
nodemonornode src/index.jsin the terminal. 3 4
Develop a fully automated system that, once students are assigned teams in the Teambuilder app, immediately adds them to the appropriate GitHub repositories and Discord channels without manual intervention.
Ensure that any changes to teams made in the TeamBuilder app automatically update in both GitHub and Discord. Keep both platforms in sync with the current team structure.
Create a system that detects and handles errors in the assignment process (e.g., failed API calls) and sends notifications to administrators to resolve issues.
If invitation to GitHub or Discord was send to all students, but the number of people in the GitHub or Discord doesn’t match to number of people in the team, send email to administrators and team members that some of them didn’t accept the invites.
Implement a system to store team and student data long-term, allowing for historical analysis of project team structures, participation, and outcomes for improving future course management.
Footnotes
-
NOTE: Getting the
TOKENandBOT_IDvalues require you to have admin access to a constructed bot via Discord Dev
TheTOKENvalue is taken from Discord Dev. You can find it located under theBottab.
TheGuild_IDcan be found by right-clicking the Discord server's name and clickingCopy Server ID
TheBot_IDcan be found by right clicking the bot in discord and clickingCopy User ID. Alternatively it can also be found in the URL of the bot on Discord Dev ↩ -
If
nodemonis returning an error, it means there is an error in the code, not that the setup is incorrect. ↩ -
S.C.I.P.E. will output:
SCIPE (Skippy)#7016 is online.to the terminal when the bot is running correctly. ↩