feat(command): add ticket system#1029
Open
nomnomshark41 wants to merge 18 commits intoallthingslinux:mainfrom
Open
feat(command): add ticket system#1029nomnomshark41 wants to merge 18 commits intoallthingslinux:mainfrom
nomnomshark41 wants to merge 18 commits intoallthingslinux:mainfrom
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This pull request introduces a support ticket system to Tux, including database schema changes, backend controllers, and Discord bot cogs with logging and configuration. The main changes add models and logic to manage tickets, track their status, and log transcripts with event metadata. Additionally, the database controller system is extended to support ticket operations.
Ticket System Implementation
Ticketmodel andTicketStatusenum, including fields for ticket metadata and relations toGuildfor efficient querying.Guildmodel` to include a relation to tickets, enabling guild-level ticket management.Database Controller Enhancements
TicketControllerwith methods for creating, updating (claim, unclaim, close), querying, and deleting tickets, following best practices for error handling and async operations.TicketControllerinto the mainDatabaseController, allowing unified access to ticket operations alongside existing controllers.Ticketmodel in base controller imports and type lists for proper ORM integration (base.py).Discord Bot Ticket Logging & Configuration
TicketLogfor enhanced ticket transcript logging, including event tracking (claims, closes, permission changes), message analysis, and metadata-rich transcript files sent to a configurable log channel.TicketLogConfigto set and persist the ticket log channel per guild, supporting administrator-only slash commands for setup.Minor Moderation Command Update
"t"alias from thetimeoutcommand to avoid conflicts or confusion.Guidelines
My code follows the style guidelines of this project (formatted with Ruff)
I have performed a self-review of my own code
I have commented my code, particularly in hard-to-understand areas
I have made corresponding changes to the documentation if needed
My changes generate no new warnings
I have tested this change
Any dependent changes have been merged and published in downstream modules
I have added all appropriate labels to this PR
I have followed all of these guidelines.
How Has This Been Tested? (if applicable)
I ran Tux in dev mode and tested it with mods from ATL in a private server.
Screenshots (if applicable)
Please add screenshots to help explain your changes.
Additional Information
Please add any other information that is important to this PR.
Summary by Sourcery
Add a comprehensive support ticket system to the bot, encompassing database schema updates, a new TicketController, Discord commands and cogs for ticket creation and management, interactive UI views, and a transcript logging subsystem with configurable log channel per guild
New Features:
Enhancements: