This Discord bot automatically notifies users about updates on their college LMS (Learning Management System), specifically focusing on assignments, labs, quizzes, and other important events while filtering out attendance-related notifications.
- Secure storage of user credentials using encryption
- Automatic notifications for new LMS updates
- Manual update checking
- Filtering of attendance-related events
- Easy registration process via Discord DMs
Before you begin, ensure you have met the following requirements:
- Python 3.7 or later
- A Discord account and a registered Discord application/bot
- Access to the LMS you want to monitor
-
Clone this repository:
git clone https://github.com/yourusername/lms-discord-bot.git cd lms-discord-bot -
Install the required packages:
pip install -r requirements.txt -
Set up your Discord bot token in a
.envfile:DISCORD_TOKEN=your_discord_bot_token_here
-
Update the
PORTAL_URL,LOGIN_URL, andCALENDAR_URLvariables indiscord_bot.pyif your LMS uses different URLs. -
Customize the update check interval by modifying the
@tasks.loop(minutes=30)decorator indiscord_bot.py.
-
Run the bot:
python discord_bot.py -
Invite the bot to your Discord server using the OAuth2 URL generated in the Discord Developer Portal.
-
Users can register with the bot using the following command in a Discord channel or DM:
!register -
Other available commands:
!force_check: Manually trigger an update check!bothelp: Display help information
- User credentials are stored securely using encryption.
- The encryption key is stored in
encryption_key.key. Keep this file secure and back it up safely.
You can customize the bot's behavior by modifying the following:
- Event filtering logic in the
check_for_updatesmethod of thePortalMonitorclass - Update check interval in the
@tasks.loopdecorator - Command prefixes and names in the
discord_bot.pyfile
If you encounter any issues:
- Ensure your Discord bot token is correct in the
.envfile - Check if the LMS URLs are correct and accessible
- Verify that you have the necessary permissions in your Discord server
Contributions to improve the LMS Discord Bot are welcome. Please follow these steps:
- Fork the repository
- Create a new branch (
git checkout -b feature/your-feature-name) - Make your changes
- Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin feature/your-feature-name) - Create a new Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
This bot is for educational purposes only. Ensure you have permission to access and monitor your LMS using automated tools.