From 177bc30783bcab62dc7aac8c87b69b99046e5d3a Mon Sep 17 00:00:00 2001 From: Taku <45324516+Taaku18@users.noreply.github.com> Date: Mon, 6 Oct 2025 22:13:55 -0700 Subject: [PATCH] Add config help for snooze configs Signed-off-by: Taku <45324516+Taaku18@users.noreply.github.com> --- CHANGELOG.md | 7 +++--- core/config_help.json | 57 +++++++++++++++++++++++++++++++++++++++++++ core/paginator.py | 2 +- 3 files changed, 61 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 80bff1b0ad..83c4f1bdd4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,17 +9,16 @@ however, insignificant breaking changes do not guarantee a major version bump, s # v4.2.0 Upgraded discord.py to version 2.6.3, added support for CV2. -Forwarded messages now properly show in threads, rather then showing as an empty embed. +Forwarded messages now properly show in threads, rather than showing as an empty embed. ### Fixed -- Make Modmail keep working when typing is disabled due to a outage caused by Discord. +- Make Modmail keep working when typing is disabled due to an outage caused by Discord. - Resolved an issue where forwarded messages appeared as empty embeds. - Fixed internal message handling and restoration processes. -- Corrected a bug in the unsnooze functionality. - Eliminated duplicate logs and notes. - Addressed inconsistent use of `logkey` after ticket restoration. - Fixed issues with identifying the user who sent internal messages. -- Solved an ancient bug where closing with words like `evening` wouldnt work. +- Solved an ancient bug where closing with words like `evening` wouldn't work. - Fixed the command from being included in the reply in rare conditions. ### Added diff --git a/core/config_help.json b/core/config_help.json index 6547c85ebd..462e4e1c03 100644 --- a/core/config_help.json +++ b/core/config_help.json @@ -1265,5 +1265,62 @@ "You can use `{min_characters}` as a placeholder for the minimum required characters.", "See also: `thread_min_characters`, `thread_min_characters_title`, `thread_min_characters_response`." ] + }, + "max_snooze_time": { + "default": "604800 (7 days in seconds)", + "description": "The maximum duration in seconds that a thread can be snoozed. When a thread is snoozed, it is temporarily hidden until the user replies or a moderator unsnoozes it.", + "examples": [ + "`{prefix}config set max_snooze_time 86400` (1 day)", + "`{prefix}config set max_snooze_time 1209600` (14 days)" + ], + "notes": [ + "The value must be specified in seconds.", + "See also: `snooze_title`, `snooze_text`, `unsnooze_text`, `unsnooze_notify_channel`." + ] + }, + "snooze_title": { + "default": "\"Thread Snoozed\"", + "description": "This is the message embed title sent when a thread is snoozed.", + "examples": [ + "`{prefix}config set snooze_title Thread Paused`" + ], + "notes": [ + "See also: `snooze_text`, `unsnooze_title`, `max_snooze_time`." + ] + }, + "snooze_text": { + "default": "\"This thread has been snoozed. The channel will be restored when the user replies or a moderator unsnoozes it.\"", + "description": "This is the message embed content sent when a thread is snoozed.", + "examples": [ + "`{prefix}config set snooze_text This conversation is on hold temporarily.`" + ], + "notes": [ + "Discord flavoured markdown is fully supported in `snooze_text`.", + "See also: `snooze_title`, `unsnooze_text`, `max_snooze_time`." + ] + }, + "unsnooze_text": { + "default": "\"This thread has been unsnoozed and restored.\"", + "description": "This is the message content sent when a thread is unsnoozed and restored.", + "examples": [ + "`{prefix}config set unsnooze_text Thread has been reactivated.`" + ], + "notes": [ + "Discord flavoured markdown is fully supported in `unsnooze_text`.", + "See also: `snooze_text`, `unsnooze_notify_channel`, `max_snooze_time`." + ] + }, + "unsnooze_notify_channel": { + "default": "\"thread\"", + "description": "This is the channel where the unsnooze notification will be sent. Set to \"thread\" to send in the thread's own channel, or provide a specific channel ID.", + "examples": [ + "`{prefix}config set unsnooze_notify_channel thread`", + "`{prefix}config set unsnooze_notify_channel 9234932582312` (9234932582312 is the channel ID)" + ], + "notes": [ + "If set to \"thread\", the notification will be sent in the thread channel itself.", + "If set to a channel ID, the notification will be sent to that specific channel.", + "See also: `unsnooze_text`, `max_snooze_time`." + ] } } \ No newline at end of file diff --git a/core/paginator.py b/core/paginator.py index 7356804ccb..48222d283e 100644 --- a/core/paginator.py +++ b/core/paginator.py @@ -149,7 +149,7 @@ def last_page(self): """Returns the index of the last page""" return len(self.pages) - 1 - async def run(self) -> typing.Optional[Message]: + async def run(self) -> None: """ Starts the pagination session. """