[Mute]: Make unmute dms independant of mute dms. #6731

Merged
Evanroby merged 8 commits from unmute-dm into V3/develop 2026-11-12 10:40:40 +01:00
Evanroby commented 2026-04-06 11:42:33 +02:00 (Migrated from github.com)

Description of the changes

Fixes #6262

This PR introduces a new feature - mute dms and unmute dms fully independent toggles

New command :

[p]muteset unmutesenddm true/false - controls unmute dms independently

dm_on_unmute defaults to True so existing behavior is preserved for guilds that had dm=True

Have the changes in this PR been tested?

No

### Description of the changes Fixes #6262 This PR introduces a new feature - mute dms and unmute dms fully independent toggles ## New command : `[p]muteset unmutesenddm true/false` - controls unmute dms independently `dm_on_unmute` defaults to `True` so existing behavior is preserved for guilds that had `dm=True` ### Have the changes in this PR been tested? <!-- Choose one (remove the line that doesn't apply): --> No <!-- If the question doesn't apply (for example, it's not a code change), choose Yes. Please respond to this question truthfully. We do not delay nor reject PRs based on the answer to this question but it allows to better review this PR. -->
TrustyJAID (Migrated from github.com) reviewed 2026-04-06 11:42:33 +02:00
Jackenmen (Migrated from github.com) requested changes 2026-05-28 14:44:22 +02:00
Jackenmen (Migrated from github.com) left a comment

I think a better default would be not to send DMs on unmute. To keep the behaviour unchanged for existing users, you can implement a migration that sets dm_on_unmute to True when dm is True.

I think a better default would be *not* to send DMs on unmute. To keep the behaviour unchanged for existing users, you can implement a migration that sets `dm_on_unmute` to `True` when `dm` is `True`.
@ -262,7 +290,7 @@ muteset settings
.. code-block:: none
Jackenmen (Migrated from github.com) commented 2026-05-28 14:33:49 +02:00

We prefer to keep the number of header markers the same as the header's length:

""""""""""""""""""""
muteset unmutesenddm
""""""""""""""""""""
We prefer to keep the number of header markers the same as the header's length: ```suggestion """""""""""""""""""" muteset unmutesenddm """""""""""""""""""" ```
Jackenmen (Migrated from github.com) requested changes 2026-05-28 18:17:48 +02:00
Jackenmen (Migrated from github.com) left a comment

The migration part of my review remains unaddressed

The migration part of my review remains unaddressed
Evanroby commented 2026-05-28 19:11:10 +02:00 (Migrated from github.com)

My bad I skipped that comment, will do on my free time.

My bad I skipped that comment, will do on my free time.
Evanroby commented 2026-05-28 21:37:03 +02:00 (Migrated from github.com)

Applied requested changes

Applied requested changes
Jackenmen (Migrated from github.com) requested changes 2026-11-09 19:39:40 +01:00
Jackenmen (Migrated from github.com) left a comment

I think sendmutedm and sendunmutedm would be better names for the commands.

Feature itself appears to work as intended.

I think `sendmutedm` and `sendunmutedm` would be better names for the commands. Feature itself appears to work as intended.
@ -262,7 +290,7 @@ muteset settings
.. code-block:: none
Jackenmen (Migrated from github.com) commented 2026-11-09 19:36:35 +01:00
muteset sendunmutedm
```suggestion muteset sendunmutedm ```
Jackenmen (Migrated from github.com) commented 2026-11-09 19:36:42 +01:00
    [p]muteset sendunmutedm <true_or_false>
```suggestion [p]muteset sendunmutedm <true_or_false> ```
Jackenmen (Migrated from github.com) commented 2026-11-09 19:37:12 +01:00
This setting is independent of ``[p]muteset sendmutedm``, which controls
```suggestion This setting is independent of ``[p]muteset sendmutedm``, which controls ```
@ -799,2 +829,4 @@
This is independent of `[p]muteset sendunmutedm` which controls unmute DMs."""
await self.config.guild(ctx.guild).dm.set(true_or_false)
if true_or_false:
Jackenmen (Migrated from github.com) commented 2026-11-09 19:34:39 +01:00
    @muteset.command()
    @commands.guild_only()
    @commands.mod_or_permissions(manage_channels=True)
    async def sendunmutedm(self, ctx: commands.Context, true_or_false: bool):
```suggestion @muteset.command() @commands.guild_only() @commands.mod_or_permissions(manage_channels=True) async def sendunmutedm(self, ctx: commands.Context, true_or_false: bool): ```
Jackenmen (Migrated from github.com) commented 2026-11-09 19:36:57 +01:00
        This is independent of `[p]muteset sendmutedm` which controls mute DMs."""
```suggestion This is independent of `[p]muteset sendmutedm` which controls mute DMs.""" ```
Jackenmen (Migrated from github.com) commented 2026-11-09 19:28:52 +01:00
            "Send DM on mute: {dm}\n"
```suggestion "Send DM on mute: {dm}\n" ```
Jackenmen (Migrated from github.com) commented 2026-11-09 19:29:00 +01:00
            "Send DM on unmute: {dm_on_unmute}\n"
```suggestion "Send DM on unmute: {dm_on_unmute}\n" ```
Evanroby commented 2026-11-09 20:36:18 +01:00 (Migrated from github.com)

As I am on mobile until tomorrow evening, I will just apply the requested changes. If you got more nitpicks, or changes to request, please state so.

As I am on mobile until tomorrow evening, I will just apply the requested changes. If you got more nitpicks, or changes to request, please state so.
Evanroby commented 2026-11-10 20:16:56 +01:00 (Migrated from github.com)

I think sendmutedm and sendunmutedm would be better names for the commands.

Feature itself appears to work as intended.

Applied every changes you have suggested, if you got more, let me know

> I think `sendmutedm` and `sendunmutedm` would be better names for the commands. > > Feature itself appears to work as intended. Applied every changes you have suggested, if you got more, let me know
Jackenmen (Migrated from github.com) requested changes 2026-11-10 20:18:15 +01:00
@ -266,3 +293,4 @@
[p]muteset settings
.. tip:: Alias: ``muteset showsettings``
Jackenmen (Migrated from github.com) commented 2026-11-10 20:17:34 +01:00
.. _mutes-command-muteset-sendunmutedm:
```suggestion .. _mutes-command-muteset-sendunmutedm: ```
Jackenmen (Migrated from github.com) commented 2026-11-10 20:18:06 +01:00

With this being renamed, it needs to be moved to remain in alphabetical order.

With this being renamed, it needs to be moved to remain in alphabetical order.
Evanroby (Migrated from github.com) reviewed 2026-11-10 20:22:58 +01:00
@ -266,3 +293,4 @@
[p]muteset settings
.. tip:: Alias: ``muteset showsettings``
Evanroby (Migrated from github.com) commented 2026-11-10 20:22:58 +01:00

On it!

On it!
Evanroby commented 2026-11-10 20:25:00 +01:00 (Migrated from github.com)

Applied fixes.

Applied fixes.
Jackenmen (Migrated from github.com) approved these changes 2026-11-12 10:40:34 +01:00
Jackenmen (Migrated from github.com) left a comment

Looks good, thanks!

Looks good, thanks!
Sign in to join this conversation.
No labels
Automated PR
Blocked
Blocked By: Damage Control
Blocked By: Dependency
Blocked By: Other PR
Breaking Change
Category: CI
Category: Cogs - Admin
Category: Cogs - Alias
Category: Cogs - Audio
Category: Cogs - Bank
Category: Cogs - Cleanup
Category: Cogs - CustomCommands
Category: Cogs - Dev
Category: Cogs - Downloader
Category: Cogs - Economy
Category: Cogs - Filter
Category: Cogs - General
Category: Cogs - Image
Category: Cogs - Mod
Category: Cogs - Modlog
Category: Cogs - Mutes
Category: Cogs - Permissions
Category: Cogs - Reports
Category: Cogs - Streams
Category: Cogs - Trivia
Category: Cogs - Trivia - Lists
Category: Cogs - Warnings
Category: Core - API - App Commands Package
Category: Core - API - Audio
Category: Core - API - Bank
Category: Core - API - Commands Package
Category: Core - API - Config
Category: Core - API - Other
Category: Core - API - Utils Package
Category: Core - Bot Class
Category: Core - Bot Commands
Category: Core - Command-line Interfaces
Category: Core - Downloader
Category: Core - Help
Category: Core - i18n
Category: Core - Modlog
Category: Core - Other Internals
Category: Core - RPC/ZMQ
Category: Docker
Category: Docs - Changelogs
Category: Docs - For Developers
Category: Docs - Install Guides
Category: Docs - Other
Category: Docs - User Guides
Category: Meta
Category: RPC/ZMQ methods
Category: Vendored Packages
Changelog Entry: Added
Changelog Entry: Pending
Changelog Entry: Skipped
Closed: Duplicate
Closed: External
Closed: Invalid
Closed: User Error
Closed: Won't Fix
Complex Issue
Docs-only
Feature Branch
Good First Issue
Help Wanted
High Priority
Needs Backport To stable-docs
No Activity
No Repro
QA: Bypassed
QA: Changes Requested
QA: Passed
Release Blocker
Status: Accepted
Status: Frozen
Status: In Progress
Status: Needs Discussion
Status: Needs Info
Status: Needs Triage
Status: PRs Welcome
Type: Bug
Type: Dependency Update
Type: Deprecation
Type: Enhancement
Type: Feature
Type: Informational
Type: Merge
Type: Optimisation
Type: Question
Type: Removal
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Mrcoolgamer11/Red-DiscordBot!6731
No description provided.