feat(settings.json): add new image URLs for various case statuses to enhance visual feedback
refactor(cases.py): improve code readability by adding parameter descriptions and breaking down long function calls
feat(cases.py): add active and inactive case icons to embeds for better visual distinction between case statuses
feat: add new emoji assets for active_case, added, ban, inactive_case, jail, kick, removed, timeout, warn
feat(pyproject.toml): add reactionmenu package to project dependencies
refactor(ban.py): update usage instruction for ban command and remove unnecessary line after ban execution
feat(moderation/cases.py): add new moderation cases management feature
feat(reactionmenu/__init__.pyi): add new reactionmenu library for discord pagination
The moderation cases management feature allows for viewing and modifying moderation cases in the server. The reactionmenu library supports pagination with buttons, reactions, and category selection using selects.
feat(tux/stubs/reactionmenu/abc.pyi): add new stub file for reactionmenu module
This commit adds a new stub file for the reactionmenu module in the tux library. This will help in providing type hints and autocompletion for the reactionmenu module in IDEs that support Python type hints.
docs: add detailed docstrings to methods and properties in the menu class
This commit adds detailed docstrings to all methods and properties in the menu class. The docstrings include information about the purpose of each method/property, the parameters they accept, the return type, and any exceptions they might raise. This will make it easier for developers to understand how to use the menu class and what each method/property does.
feat: add set_relay and remove_relay methods in the code to handle button press events
docs: add comprehensive docstrings for set_relay and remove_relay methods explaining their functionality, parameters, and exceptions
feat(buttons.pyi): add new type stub file for reactionmenu/buttons.py to provide type hints and improve code readability and maintainability
feat: add ReactionButton class and related methods
This commit introduces the ReactionButton class, which represents a reaction in the ReactionMenu. It includes several methods for setting button details, generating skip buttons, and factory methods for creating specific types of buttons. This enhancement provides a more structured and flexible way to manage reactions in the ReactionMenu.
feat(core.pyi): add new file for ReactionMenu class with methods and properties
docs(core.pyi): add docstrings for ReactionMenu class, methods, and properties to improve code readability and provide usage information
feat: add multiple overloads to start method in ReactionMenu class to support various types of send_to parameters
docs: add comprehensive docstring to start method explaining its parameters, their types, and possible exceptions raised
feat(tux/stubs/reactionmenu): add decorators.pyi and errors.pyi stub files for better type checking
docs(decorators.pyi, errors.pyi): add MIT license and function/class descriptions for better understanding of the code
feat(reactionmenu): add new file views_menu.pyi for type hinting and better code intelligence
feat: add methods to manage menu items in ViewMenu class
- Add methods to add, remove, enable, disable, and get select items
- Add methods to add, remove, enable, disable, and get go to select items
- Add methods to add, remove, enable, disable, and get button items
- Add methods to update menu, randomize button styles, set button styles, and refresh menu items
- Add methods to stop and start the menu
- These changes provide a comprehensive interface for managing menu items in the ViewMenu class.
docs: Add comprehensive docstring to the start method in the menu class
This commit adds a detailed docstring to the start method in the menu class. The docstring includes a description of the method, its parameters, and the exceptions it raises. This will improve code readability and provide better understanding for developers working with this method.
refactor(flags.py): replace default "No reason provided" with MISSING for better error handling
style(flags.py): rename flag names for better clarity and understanding
feat(flags.py): add new class CaseModifyFlags to handle case modifications
1. Refactor error handling methods to improve readability and maintainability.
2. Add detailed docstrings to methods for better understanding of their functionality.
3. Integrate Sentry SDK to capture and log exceptions for better error tracking.
feat(database/client.py): use DEBUG constant for Prisma log_queries parameter to enable/disable query logging based on environment
refactor(main.py): remove unnecessary comments, rearrange code for better readability, pass bot instance to setup_sentry function
feat(utils/constants.py): add DEBUG constant to toggle debugging based on environment variable
refactor(utils/sentry.py): refactor setup_sentry function to accept bot instance, simplify sentry_sdk.init parameters for better readability
feat(help.py): add support for command flag details in help messages to provide more comprehensive command information
fix(help.py): correct grammar in error logging message for consistency and clarity
feat(schema.prisma): add case_status field to Case model to track case status
fix(schema.prisma): change case_number and note_number types from Int to BigInt to handle larger numbers
docs(case.py): add docstrings to methods in CaseController class to improve code readability and provide detailed information about the methods' functionality and parameters
refactor(case.py): remove get_all_cases and get_case_by_id methods from CaseController class as they were not being used, reducing unnecessary code
feat(case.py): import logger from loguru for better logging capabilities
feat(case.py): import CaseWhereInput from prisma.types to handle case queries more efficiently
refactor(case.py): simplify case retrieval methods in CaseController
- Replace multiple specific case retrieval methods with more general methods that accept options for filtering.
- This reduces code duplication and improves maintainability.
- Add docstrings to new methods to improve code readability and provide usage information.
refactor: simplify and optimize case retrieval methods in the database layer
feat: add update_case method to allow case reason and status modification
feat: add delete_case_by_number method to allow case deletion by its number
refactor(schema.prisma): switch from PROD to DEV database URLs for development testing
feat(schema.prisma): add JAIL and UNJAIL to CaseType enum to support new jail feature
feat(schema.prisma): add case_target_roles field to Case model to store jailed user's roles
refactor(schema.prisma): add comments to case_number and case_expires_at fields for clarity
refactor(schema.prisma): add comment to reminder_channel_id field for clarity
feat(jail.py): add new Jail cog for jailing users in the server
feat(unjail.py): add new Unjail class to handle unjailing of users
feat(case.py): add method to get last jail case by target id and guild id for unjailing process
feat(flags.py): add JailFlags and UnjailFlags classes to handle command flags for jailing and unjailing commands
fix(settings.json): change DEV prefix from "~" to "$" to unify command prefixes across environments
refactor(run.py): remove unnecessary return type comments and update usage instruction for better clarity
refactor(help.py): improve help command output by including command prefix and improving formatting
chore(main.py): remove unnecessary TODO comment, as the issue has been addressed
refactor(wiki.py): remove alias "w" from wiki command for clarity and to avoid command conflicts
style(main.py): wrap command names and aliases in backticks for better readability in help command
refactor(main.py): add blockquote to command documentation summary for better readability in help command
refactor(flags.py): remove default value and int type from username_or_id flag in UnbanFlags to simplify flag usage and avoid type conflicts