{"id":29714192,"url":"https://github.com/ruelalarcon/usask_class_notifier","last_synced_at":"2026-05-10T16:36:43.525Z","repository":{"id":305574714,"uuid":"1000427186","full_name":"ruelalarcon/usask_class_notifier","owner":"ruelalarcon","description":"A Discord bot that monitors University of Saskatchewan class seat availability and notifies users when seats become available.","archived":false,"fork":false,"pushed_at":"2025-07-20T21:12:38.000Z","size":88,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-20T22:21:34.644Z","etag":null,"topics":["bot","discord","python","usask"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ruelalarcon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-11T19:05:56.000Z","updated_at":"2025-07-20T21:12:41.000Z","dependencies_parsed_at":"2025-07-20T22:31:59.364Z","dependency_job_id":null,"html_url":"https://github.com/ruelalarcon/usask_class_notifier","commit_stats":null,"previous_names":["ruelalarcon/usask_class_notifier"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/ruelalarcon/usask_class_notifier","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruelalarcon%2Fusask_class_notifier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruelalarcon%2Fusask_class_notifier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruelalarcon%2Fusask_class_notifier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruelalarcon%2Fusask_class_notifier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ruelalarcon","download_url":"https://codeload.github.com/ruelalarcon/usask_class_notifier/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruelalarcon%2Fusask_class_notifier/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32864078,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-10T13:40:02.631Z","status":"ssl_error","status_checked_at":"2026-05-10T13:40:02.145Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bot","discord","python","usask"],"created_at":"2025-07-24T03:09:29.726Z","updated_at":"2026-05-10T16:36:43.505Z","avatar_url":"https://github.com/ruelalarcon.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Class Notifier Discord Bot\r\n\r\n\u003e A Discord bot that monitors University of Saskatchewan class seat availability and notifies users when seats become available.\r\n\r\n## Preview\r\n\r\n\u003cimg width=\"830\" height=\"468\" alt=\"image\" src=\"https://github.com/user-attachments/assets/58874277-3e98-43ed-88d0-9b8572c0a281\" /\u003e\r\n\r\n## Setup\r\n\r\n1. **Install dependencies:**\r\n   ```bash\r\n   pip install -r requirements.txt\r\n   ```\r\n\r\n2. **Create a Discord Bot:**\r\n   - Go to https://discord.com/developers/applications\r\n   - Create a new application\r\n   - Go to the \"Bot\" section\r\n   - Create a bot and copy the token\r\n   - Enable \"Message Content Intent\" in the bot settings\r\n\r\n3. **Configure the bot:**\r\n   - Replace `'YOUR_BOT_TOKEN'` and `CLASS_REGISTRAR_COOKIES` in `config.py` with your actual bot token\r\n   - Add your Discord user ID to the `DEVELOPERS` list in `config.py` to use developer commands\r\n   - An example config file can be found in `config.py.example`\r\n\r\n4. **Invite bot to your server:**\r\n   - Go to OAuth2 -\u003e URL Generator\r\n   - Select \"bot\" scope and \"View Channels\", \"Send Messages\", \"Read Message History\", \"Mention Everyone\" permissions\r\n   - Use the generated URL to invite the bot to your server\r\n\r\n5. **Run the bot:**\r\n   ```bash\r\n   python discord_bot.py\r\n   ```\r\n\r\n## Commands\r\n\r\n- `cn!help`\r\n  - Shows detailed help for all commands\r\n\r\n- `cn!setchannel [#channel]`\r\n  - **REQUIRED FIRST STEP**: Sets the channel where seat availability notifications will be sent\r\n  - If no channel is specified, uses the current channel\r\n  - Server admins or developers only\r\n  - Example: `cn!setchannel #class-alerts` or `cn!setchannel` (uses current channel)\r\n\r\n- `cn!add CRN SUBJECT COURSE_NUMBER YEAR TERM`\r\n  - Adds a class to be monitored and adds you to the notification list\r\n  - Example: `cn!add 12345 CMPT 332 2024 FALL`\r\n\r\n- `cn!remove CRN`\r\n  - Stops monitoring a class\r\n  - Example: `cn!remove 12345`\r\n\r\n- `cn!status`\r\n  - Shows seat counts for all monitored classes in the server\r\n  - Also shows which channel is set for notifications\r\n\r\n- `cn!cookies` (Developers only)\r\n  - Shows session cookie status and refresh times\r\n  - Developers only (user ID must be in DEVELOPERS list in config.py)\r\n\r\n- `cn!refresh` (Developers only)\r\n  - Manually refresh session cookies\r\n  - Developers only (user ID must be in DEVELOPERS list in config.py)\r\n\r\n## Features\r\n\r\n- Checks all monitored classes every 20 seconds\r\n- Sends notifications when seats become available (when count goes from 0 to \u003e0)\r\n- Per-server class monitoring (classes are tracked separately for each Discord server)\r\n- Persistent data storage (survives bot restarts)\r\n- Multiple users can monitor the same class\r\n- Automatic session cookie refresh every 5 minutes\r\n- Robust error handling and logging\r\n\r\n## Valid Terms\r\n\r\n- FALL\r\n- WINTER\r\n- SPRING\r\n- SUMMER\r\n\r\n## Notes\r\n\r\n- The bot uses the University of Saskatchewan's Banner system\r\n- **You must run `cn!setchannel` first** before the bot can send any notifications\r\n- Only users in the DEVELOPERS list (defined in config.py) can use developer commands\r\n- Session cookies are automatically refreshed every 5 minutes to maintain connectivity\r\n- All bot data including cookies are saved in `bot_data.json`\r\n- All commands use the prefix `cn!`\r\n- To find your Discord user ID: Enable Developer Mode in Discord settings, then right-click your username and select \"Copy ID\"\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruelalarcon%2Fusask_class_notifier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fruelalarcon%2Fusask_class_notifier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruelalarcon%2Fusask_class_notifier/lists"}