DM Lock
DM Lock prevents non-moderator, non-friend, non-bot members from sending direct messages to each other within your server. It uses Discord's official Incident Actions API to pause DMs server-wide, with the bot automatically renewing the restriction every hour.
How It Works
Discord's Incident Actions API allows pausing DMs for up to 24 hours at a time. When DM Lock is enabled, Thrella:
- Immediately sets
dms_disabled_untilto 24 hours from now viaguild.setIncidentActions() - Every hour, the bot renews this 24-hour window automatically
- When disabled, the bot immediately clears the restriction
This creates a persistent DM block that runs transparently for server admins.
Who Is Affected
DM Lock restricts DMs between regular members of the server. The following are exempt:
| Category | Can Still DM? |
|---|---|
| Moderators (Admin, Kick, Timeout, Ban, Manage Server perms) | Yes |
| Bots and apps | Yes |
| Users who are friends with each other | Yes |
| Regular members without moderator permissions | No |
This means scam bots and compromised accounts cannot DM your members, while staff and friends can communicate normally.
Requirements
- Subscription: STARTER tier or higher
- Bot Permission:
MANAGE_GUILD(included in the default invite link) - Server Feature: May require the Discord Community feature to be enabled on your server
Configuration
- Navigate to Dashboard > Security
- The DM Lock card appears at the top of the page
- Toggle the switch to enable or disable
The toggle takes effect immediately -- there is no need to click Save. The bot applies or clears the Discord restriction as soon as you toggle.
Auto-Renewal
Discord limits DM restrictions to a maximum of 24 hours. Thrella's DmLockService runs every hour on all bot clusters, renewing the restriction for every guild with DM Lock enabled. This provides 23 hours of buffer -- even if several renewal cycles are missed (e.g., during a brief bot restart), the restriction remains active.
Troubleshooting
DM Lock toggle shows "Upgrade"
DM Lock requires the STARTER subscription tier or higher. Upgrade your plan via Dashboard > Billing.
Toggle succeeds but DMs are not blocked
- Verify your server has the Community feature enabled in Discord Server Settings
- Check that the bot has the Manage Server permission
- Wait a few minutes -- Discord may take a moment to propagate the change
DMs re-enable after some time
This can happen if the bot was offline for more than 24 hours (the maximum restriction window). Once the bot reconnects, DM Lock will be re-applied automatically on the next renewal cycle (within 1 hour).