feat(tux/cogs/utility/repology.py): add new Repology cog to handle repology commands
feat(tux/wrappers/repology.py): add new RepologyWrapper to interact with Repology API
- feat(pyproject.toml): add pyyaml to main dependencies for YAML file handling
- fix(pyproject.toml): move pyyaml from wrong section to main dependencies
- refactor(pyproject.toml): add new linting rules "PLR0913", "PLR2004" to ignore list for better code quality
- feat(pyproject.toml): add "FURB" and "PL" to select list for enhanced linting checks
feat(pyproject.toml): add aiocache dependency for caching support
refactor(tux/cogs): change import style for checks from tux.utils
refactor(tux/cogs/admin/git.py): replace LinkButton with GithubButton for code reuse
refactor(tux/cogs/fun/xkcd.py): replace XkcdLinkButtons with XkcdButtons for code reuse
refactor(tux/cogs/guild/export.py): change import style for checks and exports from tux.utils
remove(tux/cogs/helpers.py): delete Helpers cog as it's no longer needed
refactor(tux/cogs/info/membercount.py): refactor member count command to return early if no guild is found
refactor(moderation): change import statement for checks module for better readability
feat(ban.py): add check_ban_conditions function to improve code reusability and maintainability
refactor(report.py): move ReportModal class to a separate file for better code organization
feat(snippets.py): add first and last page buttons to snippets list for better navigation
style(snippets.py): add line breaks for better code readability
fix(snippets.py): make error messages ephemeral and auto-delete after 30 seconds for cleaner chat
refactor(snippets.py): restructure snippet information embed for better readability and add bot latency
fix(client.py): disable query logging for better performance
refactor(guild_config.py): remove unused permission levels 8 and 9
fix(main.py): allow bot to mention roles for better user interaction
feat(buttons.py): add new buttons for XKCD and Github for better user experience
feat(report.py): add new report modal for anonymous reporting
refactor(constants.py): use config for TEMPVC constants instead of environment variables
style(embeds.py): simplify footer text in embeds for cleaner look
refactor(github.py): rename GitHubService to GithubService for consistency
chore(justfile): add commands to serve and build docs using MkDocs
feat(mkdocs.yml): add initial MkDocs configuration with Material theme
chore(pyproject.toml): add mkdocs-material as a dependency for docs group
feat(pyproject.toml): add pydantic package to manage data parsing and validation more efficiently
refactor(config.py): remove ConfigSelectMenu and ConfigSelectView classes to reduce redundancy
feat(config.py): import ConfigSetChannels, ConfigSetPrivateLogs, ConfigSetPublicLogs from tux.ui.views.config for better modularity and code organization
refactor(config.py): simplify and restructure guild configuration commands
- Replace the individual role setting commands with a single `config_set_roles` command that uses a choice parameter for the permission level. This reduces code duplication and makes the command more flexible.
- Replace the individual log setting commands with a single `config_set_logs` command that uses a choice parameter for the log category. This reduces code duplication and makes the command more flexible.
- Add a new `config_set_channels` command for configuring guild channels. This provides a more intuitive and user-friendly way to configure channels.
- Remove commented out code to improve code readability and maintainability.
refactor: remove commented out code for cleaner codebase
feat: add 'config_get_roles' command to fetch guild roles for better role management
refactor(guild_config.py): remove unused role update methods to clean up code
feat(guild_config.py): add method to update permission level roles for better role management
fix(guild_config.py): ensure guild exists before updating guild config to prevent errors
feat(tux/ui/views/config.py): add new file to handle discord UI views for setting log and channel configurations
This commit introduces a new file, config.py, in the tux/ui/views directory. This file contains classes for handling discord UI views for setting private, public, and channel logs. Each class has methods for setting different types of logs or channels, such as private log, report log, dev log, mod log, audit log, join log, jail channel, starboard channel, and general channel. These methods update the respective log or channel ID in the database and send a confirmation message to the user.
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
feat(.pre-commit-config.yaml): add pre-commit hooks for yaml, json, toml files and dotenv files for better code quality
feat(justfile): add check-types command to run pyright for type checking
refactor(pyproject.toml): replace aiopath with aiofiles and add types for aiofiles and psutil, adjust pyright settings for strict type checking
style(Dockerfile): improve readability by aligning RUN commands
refactor(pyproject.toml): increase line-length limit to 120 and change line-ending to 'lf' for better compatibility
refactor(pyproject.toml): reorder dependencies and add new ones for better project management
feat(tux/utils/constants.py): add new constants for gate logging and tux logs to improve logging capabilities
feat(tools.py): add new encoding methods (base64, md5, sha256, sha512) to Tools class
feat(tools.py): add new command 'encode' to encode a string to a specified format
fix(tools.py): remove '#' from color if color format is HEX to ensure correct color conversion
style(tools.py): update description of 'tools' group to 'Various tool commands' for clarity
feat: add dependabot.yml for weekly updates of GitHub Actions
chore: update Python version from 3.11 to 3.12 in .mise.toml and pyproject.toml
chore: update various dependencies in pyproject.toml to their latest versions
feat: add dependency-review.yml for automated dependency review on pull requests and weekly schedule
feat: add docker-compose.yml for setting up bot and postgres services in Docker environment
feat(mypy.ini): add new mypy.ini file for better type checking configuration
fix(schema.prisma): make created_at field in Users model nullable to handle users without creation time
feat(schema.prisma): add color field to Roles model to store role's color information
refactor(pyproject.toml): rearrange linting configuration for better readability and remove redundant mypy configuration
feat(docs): add EMBED_STANDARDS.md to establish standards for embed usage
chore(docs): remove EMBED_STANDARD.md as it's replaced by EMBED_STANDARDS.md
docs: add EMBED_USAGE.md and EVENT_STANDARDS.md to provide usage guidelines and best practices for EmbedCreator utility and event listeners
chore: remove unused __event_template__.py and base_cog.py from examples directory to clean up the codebase
build(pyproject.toml): add aioconsole and psutil to poetry dependencies for better async console handling and system monitoring
refactor(guide.py): replace custom embed creation with EmbedCreator utility
feat(ping.py): add CPU and RAM usage to bot's latency check
refactor(poll.py): replace custom embed creation with EmbedCreator utility, add TODO for future improvements
refactor(rolecount.py): replace custom embed creation with EmbedCreator utility, improve choice names for clarity
refactor(controllers.py): move DatabaseController class to top for better readability
style(main.py): remove unnecessary newline
feat(constants.py): add POLL color and icon to constants
feat(embeds.py): add method to create poll embeds with specific color and icon
fix(cog_loader.py): add exception handling to cog loading process to prevent crashes due to faulty cogs
feat(main.py): add shutdown process to handle bot termination gracefully and prevent data loss
refactor(main.py): remove console task from bot ready event to improve startup speed
feat(main.py): add KeyboardInterrupt handling to allow graceful shutdown on manual termination
refactor(console.py): replace ThreadPoolExecutor with aioconsole.ainput for non-blocking input
feat(console.py): add shutdown_bot method to initiate bot shutdown from console
fix(console.py): handle ValueError when channel_id is not an integer in send_message method
fix(console.py): handle discord.HTTPException when sending message fails in send_message method
refactor(console.py): use dictionary.get method to fetch command function to avoid KeyError
refactor(sentry.py): remove unused opentelemetry and aiohttp integrations to simplify code and improve performance
fix(sentry.py): remove unused variables 'instrumenter' and 'provider' to clean up code and improve readability
feat(settings.ini): add example ini file for abstracting permissions
feat(warn.py): add warn command to warn users for moderation purposes
refactor(ban.py, kick.py, unban.py): move default reason to function call for better readability
chore(pyproject.toml): remove black configuration as it's no longer needed
fix(pyproject.toml): update sentry-sdk version and extras from httpx to opentelemetry
refactor(pyproject.toml): update linting configuration and ignore rules
refactor(tux/*): rename Constants alias from C to CONST for better readability
refactor(tux/database/models.py): improve function parameters naming for clarity
feat(tux/main.py): integrate opentelemetry for better tracing and monitoring
refactor(tux/utils/_utils.py): improve is_convertible_to_type function readability
refactor(constants.py): change all constant keys to uppercase for better readability and consistency
refactor(constants.py): rename class instance from 'C' to 'CONST' for better clarity and understanding
feat(constants.py): change import statement and usage examples to reflect the new class instance name 'CONST'
refactor(ban.py): simplify ban command, add role checks, improve logging and error handling
refactor(kick.py): simplify kick command, add role checks, improve logging and error handling
refactor(slowmode.py): simplify slowmode command, add role checks, improve logging and error handling
refactor(unban.py): rename class 'unban' to 'Unban' for better code readability
feat(unban.py): add role check to unban command to restrict access to certain roles
refactor(unban.py): simplify unban logic by using discord.utils.get and discord.utils.find
fix(unban.py): handle discord.HTTPException for better error handling
refactor(unban.py): extract embed creation and error message sending to separate methods for better code organization
Pyright type checking has been set to basic for now.
The pre-commit hooks for `ruff-pre-commit` and `pyright-python` have been updated to their latest versions for code quality improvements. The `pre-commit-config` and `pyproject.toml` files were modified to reflect these changes.
Also, the error handler has been completely rewritten in a more flexible and scalable manner, addressing various error scenarios in a cleaner and clearer way. Individual error handling methods for common cases are now in place, making it easier to extend with more exception types in the future.
Removed some unused references to the old error handler in the main application file, simplifying the logic there. The `pyright` type checking configuration in `pyproject.toml` was also adjusted for less strict checking, better suited to our current project requirements.
Lastly, the lockfile `poetry.lock` was updated and unnecessarily tagged "dev" packages were removed.
In the wake of these changes, be mindful that the behaviour of error prompts to the user and of type checks may slightly differ.
Additional notes include punctuation and formatting adjustments to improve readability throughout the files changed.