Allow specifying bot's response to disabled commands separate for global and server-specific disables #6763

Closed
opened 2026-05-19 03:24:29 +02:00 by Jackenmen · 3 comments
Jackenmen commented 2026-05-19 03:24:29 +02:00 (Migrated from github.com)

What component of Red (cog, command, API) would you like to see improvements on?

Core Commands

Describe the enhancement you're suggesting.

We should be able to separately configure a message for global and server-specific command disabling. Both of the messages would be global, but they could differ.
More concretely, the current command disabledmsg should be used when the command is globally disabled.
If command serverdisabledmsg (this probably isn't the best way to name it) is set, that message is used for commands disabled in specific servers. If it isn't set, command disabledmsg continues to be used, as it is today.

Anything else?

Inspired by #5553 but following an approach closer to what's suggested in the comment:
https://github.com/Cog-Creators/Red-DiscordBot/pull/5553#issuecomment-1019926804.

### What component of Red (cog, command, API) would you like to see improvements on? Core Commands ### Describe the enhancement you're suggesting. We should be able to separately configure a message for global and server-specific command disabling. Both of the messages would be **global**, but they could differ. More concretely, the current `command disabledmsg` should be used when the command is globally disabled. If `command serverdisabledmsg` (this probably isn't the best way to name it) is set, that message is used for commands disabled in specific servers. If it isn't set, `command disabledmsg` continues to be used, as it is today. ### Anything else? Inspired by #5553 but following an approach closer to what's suggested in the comment: https://github.com/Cog-Creators/Red-DiscordBot/pull/5553#issuecomment-1019926804.
TrinityBerserker commented 2026-09-28 19:31:47 +02:00 (Migrated from github.com)

Hi! I'm interested in picking this up. Before I start, a couple of quick questions:

  1. Is command serverdisabledmsg acceptable as the name, or would you prefer something else?
  2. Should the new command have the same permission requirements as command disabledmsg?
  3. When it isn't set, should the server-specific case fall back to command disabledmsg exactly as it does today?

Once that's clear I'll open a PR with the implementation, tests and docs.

Hi! I'm interested in picking this up. Before I start, a couple of quick questions: 1. Is `command serverdisabledmsg` acceptable as the name, or would you prefer something else? 2. Should the new command have the same permission requirements as `command disabledmsg`? 3. When it isn't set, should the server-specific case fall back to `command disabledmsg` exactly as it does today? Once that's clear I'll open a PR with the implementation, tests and docs.
Flame442 commented 2026-09-28 21:46:31 +02:00 (Migrated from github.com)
  1. That name is the best offered so far. The only alternative I would consider is swapping command disabledmsg to be a group command with either the default behavior being global and a separate subcommand for server, or two subcommands for global and server. But increasing the depth of the grouping also makes it slightly more annoying to use and command does not have a huge number of subcommands currently so that name is probably fine.
  2. Yes (owner), since it is still a global setting.
  3. As described in the issue body, when unset the value configured for globally disabled commands should be used.

I would advise against making tests. This command does not have substantial logic worth testing outside of the behavior that directly integrates within Discord (which is annoying to mock) and the behavior that is already handled under existing tests for Config. The documentation change should be made to the Core cog guide.

1. That name is the best offered so far. The only alternative I would consider is swapping `command disabledmsg` to be a group command with either the default behavior being global and a separate subcommand for `server`, or two subcommands for `global` and `server`. But increasing the depth of the grouping also makes it slightly more annoying to use and `command` does not have a huge number of subcommands currently so that name is probably fine. 2. Yes (owner), since it is still a global setting. 3. As described in the issue body, when unset the value configured for globally disabled commands should be used. I would advise against making tests. This command does not have substantial logic worth testing outside of the behavior that directly integrates within Discord (which is annoying to mock) and the behavior that is already handled under existing tests for Config. The documentation change should be made to the [Core cog guide](https://github.com/Cog-Creators/Red-DiscordBot/blob/V3/develop/docs/cog_guides/core.rst).
Owner

Erledigt in 6fd4d9b01. Neu: [p]command serverdisabledmsg [message]. Diese Antwort gilt für Befehle bzw. Cogs, die nur auf einem Server deaktiviert sind. Ist sie nicht gesetzt (oder zurückgesetzt), wird wie bisher [p]command disabledmsg verwendet.


Generated by Claude Code

Erledigt in 6fd4d9b01. Neu: `[p]command serverdisabledmsg [message]`. Diese Antwort gilt für Befehle bzw. Cogs, die nur auf einem Server deaktiviert sind. Ist sie nicht gesetzt (oder zurückgesetzt), wird wie bisher `[p]command disabledmsg` verwendet. --- _Generated by [Claude Code](https://claude.ai/code)_
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
2 participants
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#6763
No description provided.