Add a way to include where a command is disabled in disabled message #5553

Closed
PredaaA wants to merge 2 commits from feat/command-disable-origin into V3/develop
PredaaA commented 2022-01-24 03:22:05 +01:00 (Migrated from github.com)

Description of the changes

By using {origin} placeholder in the command [p]command disabledmsg, it will show where the command is disabled.
So globally for global, and in this server if it's in the current guild.

There's a cleaner way of doing it with #5552 than currently though.

### Description of the changes By using `{origin}` placeholder in the command `[p]command disabledmsg`, it will show where the command is disabled. So `globally` for global, and `in this server` if it's in the current guild. There's a cleaner way of doing it with #5552 than currently though.
madebylydia commented 2022-01-24 09:02:47 +01:00 (Migrated from github.com)

Is there a reason to keep str.replace here? It might be interesting to setup a string.Template here (While still keeping the same format of delimiters: {})
This PR works as intended, tested on commit 54f7af5.

Is there a reason to keep `str.replace` here? It might be interesting to setup a `string.Template` here (While still keeping the same format of delimiters: `{}`) This PR works as intended, tested on commit [54f7af5](https://github.com/Cog-Creators/Red-DiscordBot/pull/5553/commits/54f7af53513ee37e9f14781925bd85bd6949fa0e).
fixator10 commented 2022-01-24 11:08:31 +01:00 (Migrated from github.com)

IMHO, better would be splitting disabled message in two messages. One for disabled globally, and one for locally disabled commands.

Since the current implementation can be confusing with i18n.

IMHO, better would be splitting disabled message in two messages. One for disabled globally, and one for locally disabled commands. Since the current implementation can be confusing with i18n.
Jackenmen commented 2022-12-27 22:51:43 +01:00 (Migrated from github.com)

IMHO, better would be splitting disabled message in two messages. One for disabled globally, and one for locally disabled commands.

I agree.

Is there a reason to keep str.replace here? It might be interesting to setup a string.Template here (While still keeping the same format of delimiters: {})

Simplicity.

> IMHO, better would be splitting disabled message in two messages. One for disabled globally, and one for locally disabled commands. I agree. > Is there a reason to keep `str.replace` here? It might be interesting to setup a `string.Template` here (While still keeping the same format of delimiters: `{}`) Simplicity.
Jackenmen commented 2026-05-19 03:25:56 +02:00 (Migrated from github.com)

Per the previous 2 comments, I created issue #6763. I'm closing this PR as I think the path forward should follow the approach proposed in #6763 instead + this has many conflicts now.

Per the previous 2 comments, I created issue #6763. I'm closing this PR as I think the path forward should follow the approach proposed in #6763 instead + this has many conflicts now.

Pull request closed

Sign in to join this conversation.
No reviewers
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!5553
No description provided.