Currently, the bot only supports a single database instance (leetbot.db), which limits its usability across multiple Discord servers (guilds). This setup is not scalable and doesn't allow for separate leaderboards or data per guild.
Proposed Changes
Multi-server Database Management:
Implement a system to create and manage separate SQLite databases for each Discord guild (guild_id_leetbot.db).
Modify database initialization (init_db(guild_id)) to dynamically create and manage guild-specific databases.
Channel ID Assignment:
Allow assignment of a specific channel ID for each guild where daily LeetCode problems are posted.
Modify the bot to use the assigned channel ID for scheduled daily postings.
Dump Directory for Databases:
Create a dump directory within the project structure to store all guild-specific .db files.
Ensure the bot can read from and write to this directory securely.
Tasks
[ ] Implement init_db(guild_id) function to handle guild-specific database creation.
[ ] Modify daily posting logic to use guild-specific channel IDs.
[ ] Create a dump directory and update file paths to store guild-specific databases there.
[ ] Update documentation to reflect these changes and provide instructions for configuration.
Description
Currently, the bot only supports a single database instance (leetbot.db), which limits its usability across multiple Discord servers (guilds). This setup is not scalable and doesn't allow for separate leaderboards or data per guild.
Proposed Changes
Multi-server Database Management:
Channel ID Assignment:
Dump Directory for Databases:
Tasks
init_db(guild_id)
function to handle guild-specific database creation.Additional Information