1
Fork 0
mirror of https://github.com/allthingslinux/tux.git synced 2024-10-02 16:43:12 +00:00
Commit graph

814 commits

Author SHA1 Message Date
kzndotsh
2181da725b refactor(logging): remove unused code 2024-07-24 09:07:05 -04:00
kzndotsh
4636341baa feat(error.py): improve error handling and logging
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.
2024-07-24 13:01:33 +00:00
kzndotsh
36b8bb69b1 fix(client.py): change logger level from error to critical for database connection and disconnection issues for better error severity representation
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
2024-07-24 13:01:13 +00:00
kzndotsh
951534b83c refactor(help.py): extract repeated code into helper functions to improve code readability and maintainability
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
2024-07-24 13:00:25 +00:00
electron271
6b27f873d9
[Commands] bring back the cow 2024-07-23 21:58:42 -05:00
kzndotsh
70cf07dbfe feat(flags.py): add CasesViewFlags class to support viewing cases by number, type, target member, and moderator
style(flags.py): remove unnecessary blank lines for better code readability
fix(flags.py): import CaseType from prisma.enums to fix unresolved reference error
2024-07-22 16:39:51 +00:00
kzndotsh
732f353a36 refactor(schema.prisma): rename enum values HACK_BAN and TEMP_BAN to HACKBAN and TEMPBAN for consistency
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
2024-07-22 16:39:18 +00:00
kzndotsh
45ec24eaff chore(.pre-commit-config.yaml): update ruff-pre-commit version from v0.5.3 to v0.5.4 to include latest updates and bug fixes 2024-07-22 16:32:33 +00:00
kzndotsh
effcced632
Merge pull request #328 from allthingslinux/renovate/ruff-0.x-lockfile 2024-07-22 12:28:27 -04:00
electron271
7488941900
[Commands] Minor change to 8ball, change ascii art + new response 2024-07-21 17:09:43 -05:00
renovate[bot]
f304846bd9
fix(deps): update dependency ruff to v0.5.4 2024-07-20 18:57:02 +00:00
kzndotsh
78630c3b80 feat(pre-commit-config.yaml): update ruff-pre-commit version to v0.5.3 for latest features and bug fixes
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
2024-07-19 09:12:51 +00:00
kzndotsh
2925aff5a8
Merge pull request #327 from allthingslinux/renovate/ruff-0.x-lockfile 2024-07-19 02:07:55 -04:00
kzndotsh
91a8d2a36a
Merge pull request #325 from allthingslinux/dart-ico 2024-07-19 02:07:44 -04:00
kzndotsh
5a2a157957
Merge pull request #324 from allthingslinux/renovate/pyright-1.x-lockfile 2024-07-19 02:07:05 -04:00
kzndotsh
3acd78e273
Merge pull request #326 from allthingslinux/role-toggle 2024-07-19 02:06:48 -04:00
renovate[bot]
ac4eb340ea
fix(deps): update dependency ruff to v0.5.3 2024-07-18 17:44:12 +00:00
electron271
2e16cb29eb
add role toggle command 2024-07-18 12:42:43 -05:00
Kasen Engel
d656e809d6
add dart icon 2024-07-17 22:43:40 -05:00
renovate[bot]
21deca8738
fix(deps): update dependency pyright to v1.1.372 2024-07-17 11:31:46 +00:00
kzndotsh
7923bbc84f feat(emojis): add new tux_prefix.png file to provide a new emoji for the bot
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
2024-07-16 18:59:09 +00:00
kzndotsh
834e933b8c
Merge pull request #321 from allthingslinux/tess-refactor 2024-07-16 13:01:35 -04:00
wlinator
bc3929d2ad sourcery: use regular loop for task cancelation 2024-07-16 16:37:22 +00:00
kzndotsh
b7c8cfc5f9
Merge pull request #322 from allthingslinux/more-role-icons 2024-07-16 12:32:35 -04:00
wlinator
79fa0d729b refactor: Fix formatting issues in help command 2024-07-16 16:31:59 +00:00
Kasen Engel
b68480038e add vala 2024-07-16 11:31:06 -05:00
kzndotsh
82ff2b8d3e
Merge pull request #320 from allthingslinux/more-role-icons 2024-07-16 12:26:18 -04:00
Kasen Engel
f7fe0cd177 tweaks (the sequel) 2024-07-16 11:24:50 -05:00
Kasen Engel
2e00e71ca6 tweaks 2024-07-16 11:21:54 -05:00
wlinator
ac25acb073 refactor: Seperate client & help subclasses from main.py 2024-07-16 16:20:37 +00:00
kzndotsh
41de1b2c24
Merge pull request #319 from allthingslinux/more-role-icons 2024-07-16 11:47:15 -04:00
Kasen Engel
ddc0f29d9a fixed logos 2024-07-16 10:38:42 -05:00
Kasen Engel
a02829037b Added some missing logos and fixed some messy ones 2024-07-16 10:24:38 -05:00
kzndotsh
4dbceb6ac6
Merge pull request #318 from allthingslinux/more-role-icons 2024-07-16 10:43:45 -04:00
Kasen Engel
9ca86021c3 added all the lang icons 2024-07-15 23:39:27 -05:00
Kasen Engel
9c847875e7 remove junk file 2024-07-15 19:35:50 -05:00
Kasen Engel
5a4be9d278 adding De/Wm icons 2024-07-15 19:35:21 -05:00
kzndotsh
64382718b7 fix(slowmode.py): change aliases from string to list for slowmode command to fix command alias issue
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
2024-07-15 11:41:46 +00:00
kzndotsh
7ee1fd1155 chore(.pre-commit-config.yaml): update ruff-pre-commit and gitleaks versions for better linting and security checks 2024-07-15 10:48:54 +00:00
kzndotsh
679de67165 style(neofetch.py, cog_loader.py, avatar.py, tldr.py): correct comment block formatting for consistency
refactor(neofetch.py): modify line separator for better visual appeal
2024-07-15 10:46:57 +00:00
kzndotsh
9dde15a4ce
Merge pull request #317 from allthingslinux/renovate/ruff-0.x 2024-07-15 06:16:56 -04:00
renovate[bot]
752359f6d5
fix(deps): update dependency ruff to ^0.5.0 2024-07-15 10:15:52 +00:00
kzndotsh
04272ada32
Merge pull request #314 from allthingslinux/renovate/githubkit-0.x-lockfile 2024-07-15 06:08:48 -04:00
kzndotsh
685b24d808
Merge pull request #310 from allthingslinux/help 2024-07-15 06:07:51 -04:00
kzndotsh
b817bbf153
Merge branch 'main' into help 2024-07-15 06:05:04 -04:00
kzndotsh
35dfe6d9d9 docs: update docstrings to follow numpydoc style guide
style: update command usage syntax for better clarity
feat: add new Roles cog for role management commands

refactor(random.py, xkcd.py, run.py, ban.py, kick.py, notes.py, purge.py, slowmode.py, timeout.py, unban.py): simplify command aliases and usage instructions for better user experience
feat(run.py): change command aliases to 'compile' and 'exec' to better reflect command functionality
style(timeout.py): update docstring format for consistency

refactor(warn.py): simplify usage instructions for better user experience
feat(avatar.py): add support for optional member parameter to allow fetching avatar of other members or self
style(avatar.py): update docstring format for better readability
refactor(snippets.py): update usage instructions and add guild_only decorator for better command control
refactor(tldr.py): add alias and usage instruction for tldr command, add guild_only decorator for better command control
style(tldr.py): update docstring format for better readability

refactor(wiki.py): add aliases, usage instructions to wiki commands for better user experience
style(functions.py): standardize docstring format for consistency and readability
2024-07-15 09:42:09 +00:00
kzndotsh
301274d938 feat(git.py): add new functionalities to Git class for better GitHub integration
refactor(git.py): rewrite Git class to use new hybrid command system for improved command handling
chore(git.py): add TODO comment to remind of necessary rewrite to new hybrid command system

refactor: replace 'tux.services.github' with 'tux.wrappers.github' for better code organization
fix: remove unused imports 'githubkit.versions.latest.models' and 'discord.ext' to clean up code

refactor(git.py): replace app_commands.Group with commands.hybrid_group for better command handling
feat(git.py): add aliases and usage instructions to git and get_repo commands for better user experience
style(git.py): replace interaction with ctx in command functions for consistency with discord.py convention
fix(git.py): remove unnecessary interaction.response.defer() call in get_repo command to improve performance

refactor(git.py): replace interaction with ctx for better command handling
feat(git.py): add aliases and usage instructions to create_issue and get_issue commands
style(git.py): make embed fields inline=False for better readability
fix(git.py): replace create_error_embed with ctx.reply for error handling
chore(git.py): remove unused commands for cleaner codebase

feat(random.py, xkcd.py, run.py): add command aliases and usage instructions to improve user experience
refactor(random.py): update docstrings for better clarity and understanding
fix(main.py): use qualified_name instead of name for command title to include parent command names
style(main.py): format help message to be more readable and consistent
refactor(tux/cogs/fun/xkcd.py, tux/cogs/misc/run.py): move import statements to improve code organization
2024-07-15 06:01:00 +00:00
kzndotsh
baf34bc9e7 chore: remove mypy.ini file as it is no longer needed for type checking 2024-07-14 14:36:29 +00:00
kzndotsh
87dd69a91c feat(mypy.ini): add mypy configuration file to enforce type checking
refactor(dev.py): enhance command descriptions, add guild_only decorator for better command control
style(eval.py): improve command usage description for better clarity
style(ban.py, kick.py): update command usage for better understanding
refactor(notes.py): enhance command descriptions, add guild_only decorator, improve error handling

refactor(moderation): update command usage and descriptions for better clarity
feat(moderation): add detailed docstrings to commands for better understanding of their functionality
style(moderation): remove unnecessary imports and improve code readability

refactor(main.py): add return type hint to send_bot_help method for better code readability
feat(main.py): add support for listing subcommands in help message to improve user experience
style(main.py): improve formatting of help message for better readability
fix(main.py): handle case when command has no aliases to prevent errors
feat(main.py): add listing of subcommands in cog help message to provide more detailed help
style(main.py): improve formatting of command help message for better readability
2024-07-14 14:36:02 +00:00
renovate[bot]
3a075df83d
fix(deps): update dependency githubkit to v0.11.7 2024-07-14 10:17:10 +00:00