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

776 commits

Author SHA1 Message Date
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
kzndotsh
dc3c98654c
Merge pull request #313 from allthingslinux/new-role-icons 2024-07-13 23:44:00 -04:00
pre-commit-ci[bot]
453a786ab5 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2024-07-14 01:46:18 +00:00
electron271
5063d24a2a
Merge branch 'main' into help 2024-07-13 20:46:11 -05:00
kzndotsh
25b5dbc20e chore: remove mypy.ini file as it is no longer needed
refactor(main.py): replace bot.close() with bot.shutdown() for a more graceful shutdown process
2024-07-13 20:20:30 +00:00
kzndotsh
ba2c75ce99
Merge pull request #312 from allthingslinux/dev 2024-07-13 16:16:37 -04:00
kzndotsh
73e4d0497e feat(wrappers): add GitHubService class in github.py for GitHub API interactions
feat(wrappers): add various functions in godbolt.py for Godbolt API interactions

The GitHubService class in github.py will allow the application to interact with the GitHub API for operations such as fetching repositories, creating issues, and managing pull requests. The functions in godbolt.py will allow the application to interact with the Godbolt API for operations such as fetching languages, compilers, and generating assembly code.

feat(xkcd.py): add new module to fetch xkcd comics
This new module includes classes and methods to fetch latest, specific, and random xkcd comics. It also supports fetching raw image data.
2024-07-13 20:06:36 +00:00
kzndotsh
bf08491c5a feat(console.py): add new console.py file to handle bot commands from console
refactor(console.py): replace ThreadPoolExecutor with aioconsole.ainput for non-blocking input
fix(console.py): handle ValueError when channel ID is not an integer in send_message function
refactor(console.py): remove unused close_executor function
feat(console.py): add shutdown_bot function to initiate bot shutdown from console
style(console.py): improve code readability and comments

feat: add command_func() to enhance functionality

feat(pagination.py): add new file for handling pagination in discord interactions
This new file includes a class for creating interactive list menus in discord. It allows for navigation through a list of items (either strings or discord.Embed objects) using buttons in the discord UI. The list menu can be set to be ephemeral (disappears after a certain timeout) or persistent. The class also includes methods for handling user interactions with the list menu, such as jumping to the first or last item, or navigating to the next or previous item.

feat(rolecount.py): add new RoleCount cog to count users in each role
This new feature allows users to see the number of users in each role. It supports distro, language, DE/WM, misc, and vanity roles. The role count is displayed in an embed with pagination support.

feat(moderation): add ModerationCogBase class to handle moderation tasks

This class includes methods for creating and sending embeds, and sending direct messages to users. This will help in managing moderation tasks more efficiently.
2024-07-13 20:02:03 +00:00
kzndotsh
73943b1e98 feat(moderation): add ban.py and kick.py to implement ban and kick commands
These new files introduce the functionality to ban and kick users from the server. They include checks for permissions, role hierarchy, and self-targeting. They also handle sending DMs to the affected user, logging the action, and creating a case in the database.

feat(notes.py): add new Notes class for managing user notes
feat(purge.py): refactor Purge class to improve error handling and add support for purging messages from a specified channel

refactor(report.py): replace constant LOG_CHANNELS with DatabaseController to fetch guild-specific log channels
feat(report.py): add guild check to prevent usage of report command in DMs
fix(slowmode.py): remove unnecessary checks and embeds, simplify command to use ctx instead of interaction
style(slowmode.py): improve readability by reducing complexity and removing unnecessary comments

feat(moderation): add timeout and unban functionalities to moderation cogs
- timeout.py: allows moderators to temporarily restrict a user's access to the server
- unban.py: allows moderators to lift a ban from a user in the server

feat(warn.py): add new Warn class for moderation cog
This commit introduces a new Warn class in the moderation cog. This class includes commands for creating, deleting, and updating warnings for users. It also includes a helper function to handle the response after a case action. This feature enhances the moderation capabilities of the bot.
2024-07-13 19:54:10 +00:00
kzndotsh
cea555fdb7 feat(embeds.py): add create_embed_footer function to generate dynamic footers based on context or interaction
refactor(embeds.py): rename EMBED_STATE_COLORS to EMBED_COLORS and EMBED_STATE_ICONS to EMBED_ICONS for better clarity
style(embeds.py): add type ignore comment to suppress type checking warnings on embed.color assignment
2024-07-13 19:53:37 +00:00
kzndotsh
b69067dbbe feat(case.py): remove None return type from ensure_guild_exists and create_case methods for better type safety
feat(case.py): add get_case_by_case_number_and_guild_id and delete_case_by_case_number_and_guild_id methods for more granular case management
feat(guild_config.py): add get_log_channel method to fetch log channel based on log type
feat(guild_config.py): add methods to fetch specific guild config fields for better encapsulation and code reuse
2024-07-13 19:53:24 +00:00
kzndotsh
e911e38cd7 refactor(random.py, xkcd.py): remove unused import 'app_commands' from discord
feat(random.py, xkcd.py): add 'guild_only' decorator to restrict commands to guild channels
refactor(random.py): remove command descriptions from decorators for cleaner code
refactor(xkcd.py): replace 'app_commands' with 'commands' for command group and add 'guild_only' decorator
feat(xkcd.py): add aliases for 'xkcd' command group and its subcommands for easier access
refactor(xkcd.py): replace 'interaction' with 'ctx' in command functions for consistency with other commands
feat(xkcd.py): add 'specific' command to get a specific xkcd comic by its ID
2024-07-13 19:44:48 +00:00
kzndotsh
a22fcf0360 refactor(dev.py): remove unnecessary imports and descriptions, add command aliases for better usability
refactor(eval.py): add alias "e" to eval command for quicker access
refactor(git.py): remove create_issue_comment command, add aliases to existing commands for better usability
refactor(mail.py): add TODO comment for future refactoring, move command description to docstring for better readability
2024-07-13 19:41:41 +00:00
kzndotsh
e464051cdc feat(guide.py): add new guide.py file to provide server guide functionality
feat(tools.py): add new tools.py file to provide various tool commands
refactor(tldr.py): remove redundant docstring, rename tldr function to slash_tldr
feat(tldr.py): add prefix_tldr function to support prefix command for TLDR pages

refactor(wiki.py): remove unused import 'app_commands' from discord
style(wiki.py): remove explicit command descriptions for 'arch' and 'atl' commands for cleaner code
docs(wiki.py): simplify function docstrings for 'arch_wiki' and 'atl_wiki' methods for better readability
2024-07-13 19:40:25 +00:00
kzndotsh
9cd1c3e0af refactor(info.py): rename 'group' to 'info' for better clarity
style(info.py): remove unnecessary line breaks and reorganize code for better readability
fix(info.py): check for guild existence before using it to prevent potential errors
feat(info.py): add bot count to server info command for more detailed server information
2024-07-13 19:38:52 +00:00
kzndotsh
cf5e8825f3 refactor(avatar.py): modify avatar command to support both slash and prefix commands
feat(avatar.py): add guild_only decorator to restrict command usage to guilds only
style(avatar.py): improve function and parameter descriptions for better understanding
fix(avatar.py): replace profile_avatar with global_avatar for accurate representation
2024-07-13 19:38:17 +00:00
kzndotsh
37c796d24e feat(schema.prisma): add DEV_DATABASE_URL and DEV_DIRECT_URL as commented lines for easy switch between prod and dev databases
refactor(schema.prisma): reorder CaseType enum values for better readability
fix(schema.prisma): rename TIMEOUT_ADD and TIMEOUT_REMOVE to TIMEOUT and UNTIMEOUT for better semantics
2024-07-13 19:37:14 +00:00
kzndotsh
709202ace7 feat(helpers.py): add new helper functions for discord bot to improve code reusability and maintainability 2024-07-13 19:35:25 +00:00
kzndotsh
8b2c035069 refactor(main.py): rename TuxBot class to Tux for simplicity
chore(main.py): comment out unused imports and variables to clean up code
fix(main.py): remove activity_changer as it's no longer used
style(main.py): add logger.info statements for better logging
refactor(main.py): simplify prefix and token assignment
refactor(main.py): replace bot.shutdown() with bot.close() for clarity
chore(main.py): comment out console related code as it's not used currently
2024-07-13 19:33:47 +00:00
kzndotsh
c72551ccca chore(activities.py): remove activities.py as it is no longer needed
feat(flags.py): add new flags.py file to handle command flags for ban, temp ban, kick, timeout, and unban commands
2024-07-13 19:32:49 +00:00
kzndotsh
51692de2fd feat(tux/handlers): add activity, error, and event handlers for bot functionality
- activity.py: Implement ActivityHandler for managing bot activities
- error.py: Implement ErrorHandler for handling command errors
- event.py: Implement EventHandler for handling guild join/leave events and harmful message detection
2024-07-13 19:30:47 +00:00
kzndotsh
44120fdbb8 refactor(functions.py): simplify harmful_command_pattern for readability
fix(functions.py): remove unused import Callable
refactor(functions.py): remove redundant second_test in is_harmful function
feat(functions.py): add return type hints to datetime_to_unix and datetime_to_elapsed_time functions
chore(functions.py): remove unused functions to improve code maintainability
2024-07-13 19:29:14 +00:00
kzndotsh
a9bcf45421 refactor(cog_loader.py): replace aiopath with pathlib and aiofiles for better compatibility
fix(cog_loader.py): remove conditional cog_ignore_list based on DEV constant, use a single COG_IGNORE_LIST for simplicity
style(cog_loader.py): rename variables for clarity, apath to path, and filepath to path
2024-07-13 19:26:53 +00:00
kzndotsh
7925a3cecc refactor(settings.json, constants.py): simplify and rename EMBED_STATE_COLORS and EMBED_STATE_ICONS to EMBED_COLORS and EMBED_ICONS respectively for better readability
feat(constants.py): add TOKEN, PREFIX, COG_IGNORE_LIST constants to handle environment specific variables for better code maintainability
style(constants.py): remove unused UNICODE and EMOJIS constants to clean up the code
fix(settings.json): update EMBED_COLORS and EMBED_ICONS values to reflect the latest design changes
2024-07-13 19:25:16 +00:00
kzndotsh
365c0278f8 feat: add new modules for tux application
This commit includes the addition of new modules for the tux application. These modules include cogs, database, handlers, services, and utils. Each of these modules has been initialized with an __init__.py file.
2024-07-13 19:23:48 +00:00
electron271
82fd09af23
improve 2024-07-13 14:21:33 -05:00
kzndotsh
b02e1ee5f3 chore(.env.example): restructure and clean up environment variables for better organization and clarity
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
2024-07-13 19:21:16 +00:00
electron271
b25c7ec092
help command draft, huge wip 2024-07-13 13:28:16 -05:00
electron271
ee47eb22c0
Merge pull request #300 from Bikoil/main
Added warning when `rm -rf ~`  is mentioned
2024-07-13 11:23:35 -05:00
FluxC0
5445bba461 text editor role icons added 2024-07-13 07:34:18 -05:00
FluxC0
1be6cc3951 ALL THE DISTRO ICONS ARE COMPLETE! YAY! also updated macos 2024-07-12 12:43:15 -05:00
electron271
b1bf1cc84f
Merge pull request #299 from allthingslinux/renovate/pyright-1.x-lockfile
fix(deps): update dependency pyright to v1.1.371
2024-07-11 21:31:57 -05:00
electron271
780d036423
Merge pull request #305 from allthingslinux/renovate/sentry-sdk-2.x-lockfile
fix(deps): update dependency sentry-sdk to v2.9.0
2024-07-11 21:27:21 -05:00
FluxC0
55fe9d803d add devuan 2024-07-11 17:47:10 -05:00
FluxC0
ecf2e739ff Make freeBSD smaller and add KISS 2024-07-11 17:41:18 -05:00
FluxC0
f81e99fe76 actually fixing name scheme (final)__real 2024-07-11 17:01:01 -05:00
FluxC0
0551ba5cee fix naming scheme 2024-07-11 16:45:38 -05:00
kzndotsh
2645bd7351 feat(assets): update distro logos for antix, mx, and redhat to provide more updated and visually appealing images 2024-07-11 17:26:03 -04:00
FluxC0
2efe4f5bc3 first batch 2024-07-11 16:21:03 -05:00