Skip to content

Conversation

@bberka
Copy link
Owner

@bberka bberka commented Apr 8, 2025

v2.3

Features

  • Tag System Implementation: Introduced a tag system, allowing users to trigger pre-defined responses from the bot using a 'tag' slash command.

    • Implemented web UI and database infrastructure for managing tags (create, view, update, delete).
    • Added command handlers for tag retrieval and execution.
    • Implemented a TagProvider class to dynamically generate slash commands for available tags.
    • Implemented a TagBotMessages helper class to centralize the creation of messages sent by the bot when using tags.
  • Enhanced User Engagement with Mirrored Reactions: Reactions added by moderators in ticket channels are now automatically mirrored to the corresponding user's direct messages, and vice versa, creating a more interactive communication experience.

  • Implement mirrored message deletion The bot now removes original user messages from DMs after they are removed to maintain organization and clarity of communications.

  • Feedback implementation: The feedback submission system is improved and a data list has been added to improve visibility of user interaction.

  • Automatic Ticket Data Deletion and Optional Timeout: Added support for automatically deleting timeout tickets.

  • Add preliminary permission policies (currently inactive) Added the configuration for authorization to be tested and applied by admins once the implementation is finished.

  • Enhance Guild Option UI with visual separators and descriptions: the visual clarity is improved by seperating groups of guild options through horizontal lines.

Bug Fixes

  • Fixed minor UI text issues
  • Fixed incorrect metric calculation
  • Fixed bot intents
  • Fixed multiple feedback submissions

Dependency Updates

  • Updated DSharpPlus to the latest NuGet nightly version.

bberka added 30 commits April 6, 2025 23:35
-   Reactions added by moderators in ticket channels are now automatically mirrored to the corresponding user's direct messages, and vice versa, creating a more interactive communication experience.
-   The default "processed" reaction is excluded from mirroring.
-   When a user deletes a message in their DM, the corresponding mirrored message in the ticket channel is now automatically deleted by the bot.
- OnMessageReactionRemoved
- OnMessageReactionAdded
- OnMessageDeleted
- Provides simple method to manage multiple mentions
- Refactored response methods to use the new `UtilMention` class for generating mentions. This eliminates the need to pass permission info arrays to response methods, simplifying their signatures and reducing dependencies.
- Added a new `message edited` response type for future message handling scenarios.
- Refactored core Modmail event handling logic into dedicated classes (e.g., ModalSubmittedEvent.cs, ComponentInteractionCreatedEvent.cs) for better organization and maintainability.
- Simplified user update event handling.
- Decomposed complex event handlers into smaller, more manageable methods, promoting code reusability and testability.
- Enhanced event logging with more detailed debug and informational messages for improved diagnostics.
- Addressed minor issues related to reaction mirroring.
- Changed event dependency ordering to group related events together.
…mmand/query files

- Heavily reorganized the project structure to better follow vertical slice architecture principles.
- Enhanced code discoverability by separating monolithic Queries.cs and Commands.cs files into individual files, each representing a single command or query.
- Includes minor class renamings for improved clarity and consistency.
- Resolved an issue where message updates by moderators were not correctly propagating the anonymous status of the ticket.
- Created a `MessageEdited` handler to be fired when bot is the user that is editing.
- Removed the "Edited" text from updated messages
- Updated code to check both the ticket's and the guild's anonymous settings.
- Ticket message history table is implemented, this table will be used for tracking message update changes to message contents
- Added a new `TicketMessageChangeStatus` enum column to the `TicketMessage` entity.
- This column indicates the current state of a ticket message (e.g., None, Deleted, Updated).
- This enhancement enables the web UI to present a history of message modifications.
…ng in transcript page

- Implemented visual indicators for edited and deleted messages in the transcript page.
- Fixed a bug where messages were not grouped chronologically.
- Note: Message history (previous versions of edited messages) is not yet displayed.
…ge history and update message entity

- Now the message entity will be updated when the content changes
- Old content of the message and new content is saved and inserted into database
- Updated todos
- Improved the visual layout of the Guild Options page by adding horizontal rule (<hr>) elements to visually separate option groups.
- Added concise explanatory text to two switch controls to clarify their functionality.
…k components

- Resolved an issue where users could submit multiple feedbacks for a ticket.
- The initial feedback message and associated components are now properly removed after a feedback submission.
- Added `FeedbackAlreadySubmittedException` and a corresponding language key to handle cases where a user attempts to submit feedback more than once.
…nfiguration

- Made the feedback content text field optional.
- Enforced maximum length constraints for feedback content and close ticket reasons, reading the values from configuration.
bberka added 17 commits April 8, 2025 18:48
- Added a data table to display all feedback entries.
- All feedbacks are now viewable in a dedicated interface.
- Laid the foundation for a tag system, which will allow users to trigger pre-defined responses from the bot.
- Added the `Tag` entity and updated `DbLength` with related constants.
- Includes database migrations and a database snapshot.
- Note: This commit provides only the groundwork; the tag functionality is not yet exposed or usable.
- Added a set of commented-out `AuthPolicy` definitions to `AuthPolicy.cs`, laying the groundwork for a future shift towards permission-based authorization.
- These policies represent granular permissions for various features (e.g., managing Discord client, viewing metrics, managing ticket types).
- Note: These policies are currently inactive and do not affect application behavior. They will be enabled in a future release. Existing role-based authorization remains in effect.
- ModmailBotException is no longer an abstract class, allowing direct instantiation.
- Added two public constructors that accept language keys for localized error messages.
- Marked the existing protected constructor (taking two strings) as obsolete, with a descriptive message.
- Introduced a web UI page for managing tags (create, view, update, delete).
- Implemented database changes to support tags:
    - Added unique constraint to tag names.
    - Enforced non-nullability for tag name and content.
    - Includes database migrations.
- Added necessary command handlers and language keys.
- Integrated the tag management page into the web UI navigation.

- Note: This implements the web UI and database components only. Tag functionality (bot commands, message calls) is not yet implemented. This is a continuation of the existing tag system groundwork.
- Introduced a `TagProvider` class to dynamically generate slash commands for available tags.
- This allows users to access tags directly through Discord slash commands.
- Added a `TagBotMessages` helper class to centralize the creation of messages sent by the bot when using tags.
- This improves code organization and consistency in tag-related responses.
- Added `GetTagByNameHandler` to retrieve tag data by name.
- Added `ProcessTagSendMessageHandler` to handle sending tag content to Discord.
- Implemented a `tag` slash command, allowing users to trigger tag responses from the bot.
- Registered `TagSlashCommands.cs` with the Discord bot for slash command availability.
- Implemented automatic conversion of spaces to hyphens (-) in tag names within the UI.
- This ensures tag names are consistent and avoids issues caused by spaces.
@bberka bberka merged commit 9d1cd9e into master Apr 8, 2025
2 checks passed
@bberka bberka deleted the dev/2.3 branch April 14, 2025 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants