A Discord bot created for the UC Merced Events, Opportunities, and News (UCM EON) Discord, a server dedicated to supplying the previously mentioned updates to students, alumni, and faculty regarding UC Merced. 🤖
- Implements the discord.py API wrapper for coding in Python along with the asyncio library to handle rate limiting.
- The Google Sheets API provides the necessary links for checking alongside the Discord channel IDs, role IDs, and database tables.
- Requests and Beautiful Soup are implemented to make the HTTPs requests and parse the HTML to monitor specific data, respectively.
- sqlite3 for data storage, with data from each URL being stored in a unique table. Data is then compared through each URL check for updates.
- The atproto SDK is used specifically to get the post from the UC Merced feed created by me using SkyFeed.
Files are split up for different feeds:
- ucmcalendar.py helps parse the HTML for events and calendar pages on the ucmerced.edu website.
- icscheck.py checks specific UC Merced related ics using the ics iCalendar library
- rssfeed.py monitors various feeds in an RSS format, including blogs, websites, and mailing lists.
- aaiscloud.py uses the aaiscloud RESTful API to obtain the daily events.
- bluesky.py checks the created UC Merced feed for new posts on BlueSky.
- newsfeed.py was specifically made for the Student Career Center's Handshake feed, but has been integrated into monitoring news feeds.
- sports.py checks for news related to the UC Merced athletic news, using the RESTful API for news.
- database.py hosts various functions that are essential in updating the SQLite database and are used in every file mentioned above.
- main.py holds all the code used for providing the UCM EON Discord with updates by using the discord.py API wrapper.
- sheets.py both retrieves the URLs, channel IDs, role IDs, and unique table names for monitoring from one worksheet and writes the URL updates into a separate worksheet.
- checksFunctions.py and sheetsFunctions.py are separate files meant for the monitoring and sheets code, respectively.
- checksFunctions.py is used throughout the project to reduce code length for each file.
- Originally stored URLs in a CSV file created using Google Sheets before using the Google Sheets API, bypassing the need for CSV files
- Began the project by storing data for each URL in separate text files sorted by URL type. Later switched to sqlite3 to store data in a database file.
- Earlier functions had unique comparison checks before creating checksFunctions.py to reduce repetitive code.
- Use the Google Drive API to store and backup the database onto Google Drive to avoid data corruption.
- Create a github page that host the formatted events for people to see alongside the Discord.
- Implement a 'Today's events' functionality that would update the server on events happening that day. ✅
- Implement a RESTful API for other UC Merced student developers to retrieve events in a given time scale.
- This will most likely involve splitting this project into three different repositories. One for retrieving data, one specificsally for the API, and one just for the bot.
- Discord commands to allow students to ask the bot for upcomings events. ✅
- Rework how checks are messages are done. Checks should be done separately and messages are posted in an interval. ✅ (Check the test branch for implementation)