refactor(membercount.py): use discord.utils.get to fetch staff role and its members count for accuracy
fix(membercount.py): only display staff count if it's greater than 0 to avoid confusion when there are no staff members
refactor(cases.py): add UserConverter as fallback to MemberConverter for better user handling
feat(client.py): enable query logging in Prisma client for better debugging
feat(main.py): add startup log message for better tracking
feat(constants.py): add environment variables for database URLs to support both development and production environments
feat(notes.py, dev.py, eval.py, git.py, mail.py): add ephemeral and delete_after parameters to ctx.send to improve user experience
refactor(random.py, xkcd.py, config.py, export.py, rolecount.py, avatar.py, run.py, ban.py): replace ctx.reply with ctx.send for better compatibility across different contexts
feat(random.py, config.py, avatar.py, run.py, ban.py): add delete_after parameter to auto delete messages after 30 seconds for cleaner chat
fix(rolecount.py): change fallback emoji from role.display_icon to "?" for better error handling
fix(avatar.py): add ephemeral parameter to make certain replies only visible to the command invoker
refactor(cases.py): remove commented code and unused function to improve code readability
refactor(cases.py): replace ctx.reply with ctx.send to ensure compatibility with different bot versions
feat(cases.py): add type hinting to emojis dictionary for better type safety
feat(cases.py): refactor emoji formatting and case description generation for better code organization
fix(jail.py): add condition to check existing permissions before setting new ones to avoid unnecessary API calls
refactor(jail.py): replace ctx.reply with ctx.send to ensure compatibility with different bot versions
style(jail.py): format interaction response to adhere to line length limit
refactor(moderation): replace ctx.reply with ctx.send for better compatibility across different contexts
feat(moderation): add delete_after and ephemeral options to interaction responses for better user experience
chore(moderation): remove unnecessary logging statements to clean up console output
feat(moderation/roles): add ephemeral and delete_after options to role assignment messages for better user experience
refactor(warn.py, poll.py, query.py, remindme.py, snippets.py, tldr.py, wiki.py): replace ctx.reply with ctx.send for consistency
feat(warn.py, poll.py, query.py, remindme.py, snippets.py): add delete_after and ephemeral parameters to ctx.send for better user experience
style(poll.py, tldr.py): remove unnecessary logger.info statements for cleaner code
fix(snippets.py): adjust permission level check for snippet deletion for better access control
feat(wiki.py): add alias 'wk' to wiki command for easier access
style(query.py): shorten footer text in embed message for brevity
feat(jail.py): add check to prevent jailing already jailed users to improve user experience
fix(jail.py): add error handling for case insertion failure to improve robustness and provide feedback
feat(jail.py): add error handling for jailing users outside of a guild context, jailing oneself, jailing a user with a higher or equal role, and jailing the server owner
fix(jail.py): correct the retrieval of jail role and jail channel by using the correct variable names jail_role_id and jail_channel_id
refactor(config.py): rename 'config_set_roles' to 'config_set_perms' for better clarity
feat(config.py): add new 'config_set_roles' command for role configuration
refactor(jail.py): improve error handling when jailing a user
fix(unjail.py): remove unnecessary return statement to allow case insertion even when no previous roles found
refactor(client.py): remove conditional debug check for database logging for cleaner code
This change allows users more time to read the messages before they are automatically deleted.
refactor(moderation): increase ephemeral message delete_after time from 10 to 30 seconds for better user experience and to allow users more time to read the messages
refactor: increase delete_after time from 10 to 30 seconds in moderation/untimeout.py, moderation/warn.py, utility/snippets.py, handlers/error.py, and ui/views/config.py for better user experience and readability
- Updated the case type emojis to use the new set of emojis defined in the 'emojis' dictionary.
- Added a case status emoji to visually represent the active or inactive status of a case.
- Refactored the _add_case_to_embed method to use the new emojis and properly format the case type and action.
chore(config.py): add TODO comments for future improvements and features
style(config.py): change 'category' to 'setting' in app_commands.describe for better clarity
refactor(schema.prisma): uncomment DEV_DATABASE_URL and DEV_DIRECT_URL for development database usage
style(schema.prisma): remove comment from case_status field for cleaner code
docs(README.md): update installation steps to include bot run command
docs(commands.md): add new file to document bot commands
docs(services.md): add new file to document bot services
feat(info.py): add new cog for server, bot, and member info commands
feat(avatar.py): add new cog for avatar command to fetch user avatars
feat(membercount.py): add new MemberCount cog to show server member count
This new cog includes a command 'membercount' that shows the total number of members, humans, bots, and staff in the server.
feat(tux/cogs): add permission level checks to commands for better access control
docs(tux/cogs): add docstrings to commands for better understanding of their functionality
feat(moderation): add permission level checks to moderation commands for enhanced security
fix(report.py): remove unnecessary permission level check from report command
refactor(timeout.py): rearrange decorators for consistency across codebase
refactor(checks.py): simplify permission check logic for better readability and performance
- Simplified the logic for setting higher_bound and determining the source type.
- Removed unnecessary comments and added new ones for clarity.
- Combined the checks for author and role into a single line.
- Simplified the sysadmin and bot owner checks by getting the user ID once and reusing it.
refactor(checks.py): streamline code for better readability and performance
fix(checks.py): handle potential exceptions to prevent runtime errors
docs(checks.py): add detailed docstrings to has_pl and ac_has_pl functions for better understanding of their usage
refactor(checks.py): improve error messages and logging for better clarity and debugging
style(checks.py): shorten some log messages for readability
refactor(guild_config.py): simplify get_perm_level_role and get_perm_level_roles methods for better readability and error handling
fix(guild_config.py): handle case where no guild config is found for a given guild_id to prevent attribute errors
refactor(checks.py): improve permission checks and role fetching logic
- refactor: Improve permission check logic by adding more detailed logging and error handling.
- refactor: Simplify role fetching logic by using walrus operator and removing redundant checks.
- refactor: Improve readability by removing unnecessary comments and adding more descriptive logging.
- refactor: Improve error handling by adding try-except blocks around database calls.
- refactor: Simplify permission level to name conversion logic.
- refactor: Improve code readability and maintainability.
refactor(checks.py): simplify get_perm_level_roles function to improve readability and performance
fix(checks.py): handle exceptions in get_perm_level_roles function to prevent crashes
style(checks.py): remove redundant comments to improve code cleanliness
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
docs(CLI.md): provide instructions for installation, development, Docker, linting, formatting, and Git commands
docs(COG_STANDARDS.md): outline standards for creating or updating cogs for the Tux Discord bot
docs(EMBED_STANDARDS.md): establish standards and best practices for creating and utilizing Discord embeds
docs: add EMBED_USAGE.md, EVENT_STANDARDS.md, PROJECT_STRUCTURE.md to provide detailed guidelines and project structure information for contributors
feat(README.md): add dynamic permission system to feature list to reflect new functionality
docs(README.md): update installation steps to include running the bot
docs(PERMISSIONS.md): change permission level 0 from 'Everyone' to 'Member' for clarity
chore(docs/resources): remove unused image.png file from resources
- Remove redundant database operations and logging
- Simplify command structure and usage
- Improve command descriptions and help messages
- Use ModerationCogBase for common moderation functionality
- Remove unused imports and clean up code structure
refactor(notes): refactor note commands to use commands.Context instead of discord.Interaction for better compatibility
feat(notes): add aliases for note commands for better user experience
fix(notes): handle case when note is not found in delete, update and view commands to prevent errors
feat(notes): add error handling for MemberNotFound and UserNotFound exceptions in delete, update and view commands
refactor(notes): refactor handle_note_response to include previous content in update command for better tracking of changes
feat(config.py): update permission level descriptions for better clarity
feat(ban.py, cases.py, jail.py, kick.py): add user avatar to embeds for better user identification
feat(jail.py): add setup_jail command to configure jail role and channel permissions
fix(jail.py): add checks for jail role and channel existence before jailing a user
chore(notes.py): remove unused Notes class to clean up codebase
feat(timeout.py, unban.py, unjail.py, untimeout.py, warn.py): add user avatar to embed thumbnail for better user recognition
refactor(unjail.py): improve error handling and add more checks for jail role and channel existence
style(info.py): remove unnecessary logging statements to declutter logs
refactor(snippets.py): remove page parameter from list_snippets function to simplify usage
feat(snippets.py): implement pagination for list_snippets function to improve user experience
fix(snippets.py): improve error handling for snippet deletion to prevent unauthorized deletions
style(error.py): remove unnecessary blank line to improve code readability
style(event.py): improve warning message for harmful commands to enhance user understanding
fix(embeds.py): remove unnecessary rounding precision for latency calculation to simplify code
style(embeds.py): remove unnecessary special characters from latency display for cleaner output
refactor(embeds.py): remove type ignore comments after confirming type compatibility
fix(flags.py): change default reason for KickFlags and TimeoutFlags to MISSING for better error handling
docs(flags.py): update description for TimeoutFlags reason to include examples
fix(help.py): correct the handling of command groups in send_bot_help method to ensure all subcommands are properly displayed
style(help.py): adjust code formatting for better readability and consistency with Python's PEP 8 style guide
refactor(schema.prisma): change perm_level_roles to perm_level_role_id for better clarity and consistency
refactor(config.py): update methods and messages to reflect changes in role handling
refactor(snippets.py): rename db_controller to db and config_db to config for better readability
refactor(snippets.py): update permission checks to use new perm_level_9_role_id
refactor(snippets.py): update db method calls to reflect new method names in DatabaseController
refactor(guild_config.py): reorganize methods under CRUD comments for better readability
feat(guild_config.py): add get_perm_level_role method to fetch role based on role type
feat(guild_config.py): add update_perm_level_role method to update role based on level
fix(guild_config.py): modify update_perm_level_role to use upsert instead of update for better data consistency
style(guild_config.py): remove commented out code for cleaner codebase