Skip to content

Help: Add handling of disabled commands to avoid DisabledCommand error#1188

Merged
Xithrius merged 8 commits into
python-discord:masterfrom
ks129:help-disabled-command
Jan 19, 2021
Merged

Help: Add handling of disabled commands to avoid DisabledCommand error#1188
Xithrius merged 8 commits into
python-discord:masterfrom
ks129:help-disabled-command

Conversation

@ks129
Copy link
Copy Markdown
Contributor

@ks129 ks129 commented Sep 27, 2020

When command is disabled and command.can_run is called, discord.py raise DisabledCommand error. Individual command help use this to check should this add You cannot run this command. to help embed. Now this first check is command disabled and only when it isn't, this run can_run check to avoid error. Closes #1180

@ks129 ks129 requested a review from a team as a code owner September 27, 2020 07:04
@ks129 ks129 requested review from MrHemlock and tagptroll1 and removed request for a team September 27, 2020 07:04
@ghost ghost added the needs 2 approvals label Sep 27, 2020
Comment thread bot/exts/info/help.py Outdated
@ghost ghost added s: waiting for author Waiting for author to address a review or respond to a comment and removed needs 2 approvals labels Sep 28, 2020
@ghost ghost added needs 2 approvals and removed s: waiting for author Waiting for author to address a review or respond to a comment labels Sep 28, 2020
@ks129 ks129 requested a review from MarkKoz September 28, 2020 12:37
Comment thread bot/exts/info/help.py Outdated
@ghost ghost added s: waiting for author Waiting for author to address a review or respond to a comment and removed needs 2 approvals labels Sep 29, 2020
@MarkKoz MarkKoz added a: information Related to information commands: (doc, help, information, reddit, site, tags) p: 2 - normal Normal Priority t: bug Something isn't working labels Oct 1, 2020
@ghost ghost added needs 2 approvals and removed s: waiting for author Waiting for author to address a review or respond to a comment labels Nov 7, 2020
@ks129 ks129 requested a review from MarkKoz November 7, 2020 16:46
Comment thread bot/exts/info/help.py Outdated
@ghost ghost added s: waiting for author Waiting for author to address a review or respond to a comment and removed needs 2 approvals labels Nov 16, 2020
@ghost ghost removed the s: waiting for author Waiting for author to address a review or respond to a comment label Nov 21, 2020
@ghost ghost added the needs 2 approvals label Nov 21, 2020
@ks129 ks129 requested a review from MarkKoz November 21, 2020 07:37
Comment thread bot/exts/info/help.py Outdated
Comment thread bot/exts/info/help.py Outdated
@ghost ghost added s: waiting for author Waiting for author to address a review or respond to a comment and removed needs 2 approvals labels Nov 24, 2020
@ks129 ks129 requested review from Akarys42 and mbaruh as code owners December 2, 2020 14:36
@ghost ghost added needs 2 approvals and removed s: waiting for author Waiting for author to address a review or respond to a comment labels Dec 2, 2020
@ks129 ks129 requested a review from MarkKoz December 2, 2020 14:37
@Xithrius Xithrius requested a review from Den4200 as a code owner January 19, 2021 16:56
@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.02%) to 56.743% when pulling e3dc8b7 on ks129:help-disabled-command into fa02180 on python-discord:master.

Copy link
Copy Markdown
Contributor

@Xithrius Xithrius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After testing, it works well. Looks good to me.

@Xithrius Xithrius merged commit 0f215c1 into python-discord:master Jan 19, 2021
@ks129 ks129 deleted the help-disabled-command branch January 20, 2021 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: information Related to information commands: (doc, help, information, reddit, site, tags) p: 2 - normal Normal Priority t: bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Exclude disabled commands from the help command

4 participants