[3.4] Add [p]diagnoseissues command (#5243) (#5294)

* Split `Requires._transition_state` into reusable methods for Diagnoser

* (style) Fix line length

* Add missing .format()

* Add handling for user permissions, privilege level, Permissions rules

* Add missing awaits, use correct method in user perms check, add 'the'

* Fix .format() fields

* Add comment

* Add new file to labeler's configuration

* Add the command to the documentation

* All the work from DiagnoserCog

You can find the commit history of it here:
https://github.com/jack1142/DiagnoserCog

* Fix circular import

* Make channel argument optional

* Add a tip about channels from different servers
(cherry picked from commit 86649e897f)

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
This commit is contained in:
Red-GitHubBot
2021-09-08 22:40:25 +02:00
committed by GitHub
parent 2ae54c837f
commit 373c04de11
5 changed files with 1069 additions and 14 deletions

View File

@@ -770,6 +770,33 @@ This is limited to one message every 60 seconds per person.
**Arguments:**
- ``[message]`` - The message to send to the owner.
.. _core-command-diagnoseissues:
^^^^^^^^^^^^^^
diagnoseissues
^^^^^^^^^^^^^^
**Syntax**
.. code-block:: none
[p]diagnoseissues [channel] <member> <command_name>
**Description**
Diagnose issues with the command checks with ease!
If you want to diagnose the command from a text channel in a different server,
you can do so by using the command in DMs.
**Example:**
- ``[p]diagnoseissues #general @Slime ban`` - Diagnose why @Slime can't use ``[p]ban`` in #general channel.
**Arguments:**
- ``[channel]`` - The text channel that the command should be tested for. Defaults to the current channel.
- ``<member>`` - The member that should be considered as the command caller.
- ``<command_name>`` - The name of the command to test.
.. _core-command-dm:
^^