refactor(constants.py): rename CHANNELS to LOG_CHANNELS for better clarity
feat(constants.py): add LOG to EMBED_STATE_COLORS and EMBED_STATE_ICONS for log embeds
feat(constants.py): add EMBED_SPECIAL_CHARS for special character usage in embeds
feat(embeds.py): add set_image method to EmbedCreator for image support in embeds
feat(embeds.py): add create_log_embed method to EmbedCreator for creating log embeds
feat(functions.py): add compare_changes, extract_guild_attrs, extract_member_attrs functions for better data handling
feat(database/controllers.py): add CRUD operations for users in UsersController
feat(database/controllers.py): add CRUD operations for infractions in InfractionsController
feat(database/controllers.py): add CRUD operations for notes in NotesController
feat(database/controllers.py): add CRUD operations for snippets in SnippetsController
docs(database/controllers.py): add docstrings to all methods in UsersController, InfractionsController, NotesController, and SnippetsController
refactor(database/controllers.py): add type hints to all methods in UsersController, InfractionsController, NotesController, and SnippetsController
feat(database/controllers.py): import Reminders model from prisma.models
feat(database/controllers.py): import datetime module for handling date and time data
docs(database/controllers.py): add docstrings to SnippetsController and RemindersController methods for better code understanding
feat(database/controllers.py): add RemindersController class to handle database operations related to reminders
refactor(database/controllers.py): add RemindersController to DatabaseController for centralized database operations management
style(embeds.py): add line breaks for better code readability and maintainability
refactor(schema.prisma): add autoincrement() to id fields in Infractions, Notes, Reminders models for automatic id generation
feat(controllers.py): add toggle_afk method in UsersController to enable/disable afk status
refactor(controllers.py): remove infraction_id from create_infraction method in InfractionsController as id is autoincremented
feat(controllers.py): add create_note, delete_note, update_note methods in NotesController for note management
refactor(schema.prisma): change InfractionType from enum to string for flexibility
refactor(schema.prisma): make created_at fields nullable and default to now() for better data consistency
refactor(database/controllers.py): rename find_users and find_user to get_all_users and get_user_by_id for better readability
feat(database/controllers.py): add InfractionsController and SnippetsController to handle infractions and snippets related operations
refactor(database/controllers.py): move InfractionType enum to controllers.py for better organization
feat(schema.prisma): add new models for Settings, Notes, and Reminders to support new features
fix(main.py): move database connection after starting coroutines to ensure they are started before connecting to the database
feat(main.py): add log message for closing database connection to improve debugging
chore(schema.prisma): comment out old postgresql datasource configuration for future reference
refactor(schema.prisma): update database schema to better represent Discord data
- Replace 'roles' model with 'Users' and 'Roles' models to separate user and role data
- Add 'UserRoles' model to represent many-to-many relationship between users and roles
- Replace 'notes' model with 'Infractions' and 'Snippets' models to separate infraction and snippet data
- Remove 'moderators', 'settings', 'logs', 'guilds', and 'messages' models as they are not needed in the new schema
- Add 'InfractionType' enum to represent different types of infractions
- Update comments to better explain the purpose of each model and field
These changes were made to better align the database schema with the data provided by Discord and to simplify the data model.
feat: add new models for logs, user_roles, notes, snippets, guilds, infractions to extend database schema
WHY: To support new features such as logging, user roles, moderator notes, text snippets, guilds, and user infractions.