From d813ecdc987fc07d340fc6813f0a567f6fcbe294 Mon Sep 17 00:00:00 2001 From: lorenzo132 <50767078+lorenzo132@users.noreply.github.com> Date: Mon, 1 Dec 2025 16:10:20 +0100 Subject: [PATCH 1/3] Remove advanced menu plugin from registry.json Removed advanced menu plugin entry from registry. Signed-off-by: lorenzo132 <50767078+lorenzo132@users.noreply.github.com> --- plugins/registry.json | 9 --------- 1 file changed, 9 deletions(-) diff --git a/plugins/registry.json b/plugins/registry.json index 4079001a50..506df880bd 100644 --- a/plugins/registry.json +++ b/plugins/registry.json @@ -1,13 +1,4 @@ { - "advanced-menu": { - "repository": "sebkuip/mm-plugins", - "branch": "master", - "description": "Advanced menu plugin using dropdown selectors. Supports submenus (and sub-submenus infinitely).", - "bot_version": "v4.0.0", - "title": "Advanced menu", - "icon_url": "https://raw.githubusercontent.com/sebkuip/mm-plugins/master/advanced-menu/logo.png", - "thumbnail_url": "https://raw.githubusercontent.com/sebkuip/mm-plugins/master/advanced-menu/logo.png" - }, "announcement": { "repository": "Jerrie-Aries/modmail-plugins", "branch": "master", From feead7f1477d949af5e432f17427d4479774902b Mon Sep 17 00:00:00 2001 From: lorenzo132 <50767078+lorenzo132@users.noreply.github.com> Date: Mon, 1 Dec 2025 16:11:30 +0100 Subject: [PATCH 2/3] Update CHANGELOG for v4.2.1 enhancements Added new configuration options for snoozing and thread creation, including limits and behaviors. Enhanced thread-creation menu with interactive features and improved snooze functionality. Signed-off-by: lorenzo132 <50767078+lorenzo132@users.noreply.github.com> --- CHANGELOG.md | 66 +++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 52 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 536680ad2a..2b7a7e28ea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,27 +9,65 @@ however, insignificant breaking changes do not guarantee a major version bump, s # v4.2.1 ### Added + +**New Configuration Options:** * `unsnooze_history_limit`: Limits the number of messages replayed when unsnoozing (genesis message and notes are always shown). * `snooze_behavior`: Choose between `delete` (legacy) or `move` behavior for snoozing. * `snoozed_category_id`: Target category for `move` snoozing; required when `snooze_behavior` is `move`. -* Thread-creation menu: Adds an interactive select step before a thread channel is created. - * Commands: - * `threadmenu toggle`: Enable/disable the menu. - * `threadmenu show`: List current top-level options. - * `threadmenu option add`: Interactive wizard to create an option. - * `threadmenu option edit/remove/show`: Manage or inspect an existing option. - * `threadmenu submenu create/delete/list/show`: Manage submenus. - * `threadmenu submenu option add/edit/remove`: Manage options inside a submenu. - * Configuration / Behavior: - * Per-option `category` targeting when creating a thread; falls back to `main_category_id` if invalid/missing. - * Optional selection logging (`thread_creation_menu_selection_log`) posts the chosen option in the new thread. - * Anonymous prompt support (`thread_creation_menu_anonymous_menu`). +* `snooze_store_attachments`: When enabled, image attachments are stored as base64 when snoozing with delete behavior, allowing them to be re-uploaded on unsnooze. +* `snooze_attachment_max_bytes`: Maximum size per attachment to store as base64 (default: 4 MiB). +* `thread_creation_menu_timeout`: Timeout duration for user interaction with the menu (default: 30 seconds). +* `thread_creation_menu_close_on_timeout`: Silently abort thread creation if user doesn't select an option. +* `thread_creation_menu_anonymous_menu`: Anonymize the initial menu prompt relayed to staff. +* `thread_creation_menu_embed_text`: Text shown in the embed above the selection dropdown. +* `thread_creation_menu_dropdown_placeholder`: Placeholder text in the dropdown before selection. +* `thread_creation_menu_selection_log`: Log the chosen menu option in the newly created thread channel. +* `thread_creation_menu_precreate_channel`: Create thread channel immediately upon first DM even if menu is enabled. +* `thread_creation_menu_embed_title`: Optional title for the thread-creation menu embed. +* `thread_creation_menu_embed_footer`: Optional footer text for the menu embed. +* `thread_creation_menu_embed_footer_icon_url`: Optional URL for the footer icon. +* `thread_creation_menu_embed_thumbnail_url`: Optional thumbnail image URL. +* `thread_creation_menu_embed_image_url`: Optional large hero image URL for the menu embed. +* `thread_creation_menu_embed_large_image`: Promote thumbnail to large hero image if no separate image URL is set. +* `thread_creation_menu_embed_color`: Color for the menu embed's side strip. + +**Thread-Creation Menu Feature:** +* Full thread-creation menu system with interactive select menus: + * `?threadmenu toggle`: Enable/disable the menu globally. + * `?threadmenu show`: List current top-level options. + * `?threadmenu option add`: Interactive wizard to create an option. + * `?threadmenu option edit/remove/show`: Manage or inspect existing options. + * `?threadmenu submenu create/delete/list/show`: Manage submenus (nested menu levels). + * `?threadmenu submenu option add/edit/remove`: Manage options inside submenus. + * `?threadmenu dump_config`: Export current configuration to a file. + * `?threadmenu load_config`: Import configuration from a file. + * `?threadmenu reset`: Reset all thread-creation menu settings to defaults. +* Per-option category targeting: Each menu option can specify a target category where threads are created. +* Submenu support: Create up to 25 main-level options, each with up to 24 nested options. +* Optional selection logging: Log which menu option was chosen in the newly created thread channel. +* Anonymous menu support: Hide original prompt author context from staff when menu is anonymized. +* Category fallback: If an option's category is invalid/missing, creation falls back to `main_category_id`. + +**Snooze Enhancements:** +* Attachment persistence for delete-behavior snoozing: Image attachments can now be stored as base64 data. +* Enhanced unsnooze functionality with configurable message replay limits. +* Auto-unsnooze task continuously monitors and automatically unsnoozes threads when duration expires. ### Changed -- Renamed `max_snooze_time` to `snooze_default_duration`. The old config will be invalidated. +- Renamed `max_snooze_time` to `snooze_default_duration` (accepts seconds or human-readable time like "7 days"). - When `snooze_behavior` is set to `move`, the snoozed category now has a hard limit of 49 channels. New snoozes are blocked once it’s full until space is freed. - When switching `snooze_behavior` to `move` via `?config set`, the bot reminds admins to set `snoozed_category_id` if it’s missing. -- Thread-creation menu options & submenu options now support an optional per-option `category` target. The interactive wizards (`threadmenu option add` / `threadmenu submenu option add`) and edit commands allow specifying or updating a category. If the stored category is missing or invalid at selection time, channel creation automatically falls back to `main_category_id`. +- Thread-creation menu options and submenu options now support per-option `category` targeting. +- Category selection in menu option wizards allows specifying ID, name, or mention format. +- Snoozed thread restoration now respects `unsnooze_history_limit` (if set) to replay only the last N messages. +- Enhanced auto-unsnooze task monitors and automatically unsnoozes threads when their snooze duration expires. +- Snoozed threads can now be moved to a dedicated category instead of being deleted (via `snooze_behavior: move`). + +### Fixed + +- Corrected behavior when snooze channel count reaches the 49-channel limit in move-based snoozing. +- Improved category resolution in threadmenu wizards (handles ID, name, and mention formats reliably). +- Enhanced thread state restoration after unsnoozing to properly re-add all recipients. # v4.2.0 From 1da704368b8d46b2483dd5f26ef3b6108241eceb Mon Sep 17 00:00:00 2001 From: lorenzo132 <50767078+lorenzo132@users.noreply.github.com> Date: Mon, 1 Dec 2025 16:21:55 +0100 Subject: [PATCH 3/3] Update CHANGELOG with new configuration options Added new configuration options for thread creation and snoozing features, including limits, behaviors, and embed settings. Signed-off-by: lorenzo132 <50767078+lorenzo132@users.noreply.github.com> --- CHANGELOG.md | 51 ++++++++++++++++++++++++++++++++------------------- 1 file changed, 32 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b7a7e28ea..f7dcc0e166 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,25 +11,38 @@ however, insignificant breaking changes do not guarantee a major version bump, s ### Added **New Configuration Options:** -* `unsnooze_history_limit`: Limits the number of messages replayed when unsnoozing (genesis message and notes are always shown). -* `snooze_behavior`: Choose between `delete` (legacy) or `move` behavior for snoozing. -* `snoozed_category_id`: Target category for `move` snoozing; required when `snooze_behavior` is `move`. -* `snooze_store_attachments`: When enabled, image attachments are stored as base64 when snoozing with delete behavior, allowing them to be re-uploaded on unsnooze. -* `snooze_attachment_max_bytes`: Maximum size per attachment to store as base64 (default: 4 MiB). -* `thread_creation_menu_timeout`: Timeout duration for user interaction with the menu (default: 30 seconds). -* `thread_creation_menu_close_on_timeout`: Silently abort thread creation if user doesn't select an option. -* `thread_creation_menu_anonymous_menu`: Anonymize the initial menu prompt relayed to staff. -* `thread_creation_menu_embed_text`: Text shown in the embed above the selection dropdown. -* `thread_creation_menu_dropdown_placeholder`: Placeholder text in the dropdown before selection. -* `thread_creation_menu_selection_log`: Log the chosen menu option in the newly created thread channel. -* `thread_creation_menu_precreate_channel`: Create thread channel immediately upon first DM even if menu is enabled. -* `thread_creation_menu_embed_title`: Optional title for the thread-creation menu embed. -* `thread_creation_menu_embed_footer`: Optional footer text for the menu embed. -* `thread_creation_menu_embed_footer_icon_url`: Optional URL for the footer icon. -* `thread_creation_menu_embed_thumbnail_url`: Optional thumbnail image URL. -* `thread_creation_menu_embed_image_url`: Optional large hero image URL for the menu embed. -* `thread_creation_menu_embed_large_image`: Promote thumbnail to large hero image if no separate image URL is set. -* `thread_creation_menu_embed_color`: Color for the menu embed's side strip. +**Complete Configuration Options:** +* `thread_creation_send_dm_embed`: True # Send embed to user when creating a thread DM +* `thread_creation_menu_enabled`: True # Boolean to enable or disable the thread-creation menu +* `thread_creation_menu_close_on_timeout`: False # Silently abort thread creation if user doesn't select an option +* `thread_creation_menu_anonymous_menu`: False # Anonymize the initial menu prompt relayed to staff +* `thread_creation_menu_selection_log`: True # Log the chosen menu option in the newly created thread channel +* `thread_creation_menu_precreate_channel`: False # Create thread channel immediately upon first DM even if menu is enabled +* `thread_creation_menu_embed_large_image`: False # Promote thumbnail to large hero image if no separate image URL is set +* `thread_min_characters`: 0 # Minimum characters required to create a thread +* `thread_min_characters_title`: "Message too short" # Title displayed when message is too short +* `thread_min_characters_response`: "Your message is too short to create a thread. Please provide more details." # Response text when message is too short +* `thread_min_characters_footer`: "Minimum {min_characters} characters required." # Footer showing required minimum characters +* `snooze_default_duration`: 604800 # Default snooze duration in seconds (7 days) +* `snooze_title`: "Thread Snoozed" # Title for the snooze notification embed +* `snooze_text`: "This thread has been snoozed. The channel will be restored when the user replies or a moderator unsnoozes it." # Text displayed when a thread is snoozed +* `unsnooze_text`: "This thread has been unsnoozed and restored." # Text displayed when a thread is unsnoozed +* `unsnooze_notify_channel`: "thread" # Channel to notify upon unsnooze ('thread' = same thread channel or channel ID) +* `snooze_behavior`: "delete" # 'delete' to delete channel, 'move' to move channel to snoozed_category_id +* `snoozed_category_id`: None # Category ID to move snoozed channels into when snooze_behavior == 'move' +* `snooze_store_attachments`: False # When True, store image attachments as base64 in snooze_data +* `snooze_attachment_max_bytes`: 4_194_304 # Maximum size per attachment to store as base64 (4 MiB) +* `unsnooze_history_limit`: None # Limit number of messages replayed when unsnoozing (None = all messages) +* `thread_creation_menu_timeout`: 30 # Timeout duration for user interaction with the menu (seconds) +* `thread_creation_menu_embed_text`: "Please select an option." # Text shown in the embed above the selection dropdown +* `thread_creation_menu_dropdown_placeholder`: "Select an option to contact the staff team." # Placeholder text in the dropdown before selection +* `thread_creation_menu_embed_title`: None # Optional title for the thread-creation menu embed +* `thread_creation_menu_embed_footer`: None # Optional footer text for the menu embed +* `thread_creation_menu_embed_thumbnail_url`: None # Optional thumbnail image URL +* `thread_creation_menu_embed_image_url`: None # Optional large hero image URL for the menu embed +* `thread_creation_menu_embed_footer_icon_url`: None # Optional URL for the footer icon +* `thread_creation_menu_embed_color`: str(discord.Color.green()) # Color for the menu embed's side strip + **Thread-Creation Menu Feature:** * Full thread-creation menu system with interactive select menus: