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

33 commits

Author SHA1 Message Date
kzndotsh
c5220c733a feat(.env.example): add new environment variables for Github and reorganize the file for better readability
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
2024-04-28 20:49:12 +00:00
renovate[bot]
102079f138
fix(deps): update dependency sentry-sdk to v2 2024-04-25 16:42:18 +00:00
renovate[bot]
67e65edd97
fix(deps): update dependency ruff to ^0.4.0 2024-04-18 23:18:29 +00:00
kzndotsh
669e31f4f4 chore(.gitignore): add github-private-key.pem to .gitignore to prevent accidental commit of private keys
refactor(pyproject.toml): replace pygithub with githubkit for better GitHub App authentication support
2024-04-18 07:04:39 +00:00
Kasen Engel
5f7178b2f9
Merge branch 'main' into githubapi 2024-04-14 06:56:36 -07:00
kzndotsh
5e7ed577da feat(pyproject.toml): add rsa dependency to support new encoding methods
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
2024-04-12 19:09:38 +00:00
kzndotsh
ff1c83a7a6 feat(pyproject.toml): add httpx, cairosvg, and pillow dependencies for new color conversion feature
feat(tools.py): add new Tools cog with color conversion command to convert colors to different formats
2024-04-12 16:29:35 +00:00
yaboytabby
e91e981ab8 Added logic 2024-04-11 21:25:51 -05:00
kzndotsh
135c6ab0a0 chore(structure) move tmp to .archive + create infra dir 2024-04-11 18:10:01 -04:00
kzndotsh
7b117b1060 feat: add .editorconfig for consistent coding style across different editors
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
2024-04-11 20:22:47 +00:00
kzndotsh
67cdc52212 chore(pre-commit-config.yaml): update ruff-pre-commit version to v0.3.6 for latest features and bug fixes
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
2024-04-11 17:56:45 +00:00
kzndotsh
693001b7d5 feat(docs): add COG_STANDARDS.md to provide guidelines for cog creation
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
2024-04-08 21:12:54 +00:00
kzndotsh
b944385860 feat(pyproject.toml): add psutil package to monitor system resources
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
2024-04-08 20:48:59 +00:00
kzndotsh
fcc152d4a7 refactor(pyproject.toml): remove unused dependencies and add new ones for better functionality
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
2024-04-08 15:51:14 +00:00
kzndotsh
f68a16b476 feat(base_cog.py): add base cog with example commands for better code organization
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
2024-04-01 19:27:00 +00:00
kzndotsh
3080f23d63 feat(pyproject.toml): add dateparser and opentelemetry-distro dependencies
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'
2024-03-31 19:29:27 +00:00
kzndotsh
669617b611 feat(pyproject.toml): add dateparser library to handle date parsing
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
2024-03-31 17:46:58 +00:00
kzndotsh
772eae6a2d [Refactor] Major changes to dir structure, temp removal of permissions, added loguru, added some async libs, improve types, clean pyproject config 2024-03-27 16:16:33 -04:00
kzndotsh
d39034e25a [Deps][CI/CD][Docs] Minor updates and fixes 2024-03-26 17:36:26 -04:00
kzndotsh
feb7d91c0d [Deps][Fix] Update ruff version to latest and pyproject tweaks 2024-03-25 01:10:40 -04:00
kzndotsh
80659c800e [Feat][Infra] Add Sentry monitoring 2024-03-22 12:41:52 -04:00
kzndotsh
9f72cbb02b [Fix] Examples dir issue 2024-03-22 06:56:30 -04:00
kaizen
e64781ad1b [Refactor][Update] pre-commit hook versions and refactor error handling
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.
2024-01-09 22:58:09 -05:00
ExploitDemon
e5c905a024 [Fix] pyproject.toml refractoring 2024-01-08 19:01:17 -07:00
ExploitDemon
f70271f6c1 [Fix] Ruff 2024-01-08 18:35:14 -07:00
Scott
8657674d94 [Reorg] Removed docstrings and put relevant info into the tux_logger.md file 2023-12-29 11:58:04 -05:00
Scott
7362102c08 [Fix] reverted back to original and added some more rules 2023-12-29 10:12:22 -05:00
Scott
ae3fe443cf [Fix] Removed line length rule since it is not supported 2023-12-29 09:57:27 -05:00
Scott
a65467f7f4 [Fix] Updating ruff rules 2023-12-29 09:55:09 -05:00
Scott
485e015e5d [Fix][Reorg] Fixing some yml/toml files to add in support for poetry and added in an .env.example to show users what it should look like at this point in time 2023-12-27 18:29:04 -05:00
Scott
1d2c2102c4 [Fix] Adjusted the source to include everything in the tux folder 2023-12-26 14:37:55 -05:00
Scott
73841c408f
Update pyproject.toml
Adding tool.pyright to make pyright fairly strict. We can change these easily by setting them to false.
2023-12-01 00:22:07 -05:00
Scott
8603125e2f
adding some place holder files
requirements.txt just holding some random packages. pre-commit and black are needed for pre-commit hooks.
2023-11-30 23:49:03 -05:00