[Docs] Reports Cog Guide (#4882)

* [Docs] Reports Cog Guide

* Add cog to toctree

* corrections for docs tox style

* Edit sig (#4881)

* fix typo

* Add labeler glob

* unify style

* decapitalize disable

* black
This commit is contained in:
Kreusada 2021-05-08 01:51:15 +01:00 committed by GitHub
parent 7f05841b96
commit d666c24bd4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 146 additions and 1 deletions

3
.github/labeler.yml vendored
View File

@ -138,7 +138,10 @@
# Docs # Docs
- docs/cog_permissions.rst - docs/cog_permissions.rst
"Category: Reports Cog": "Category: Reports Cog":
# Source
- redbot/cogs/reports/* - redbot/cogs/reports/*
# Docs
- docs/cog_guides/reports.rst
"Category: RPC/ZMQ API": "Category: RPC/ZMQ API":
# Source # Source
- redbot/core/rpc.py - redbot/core/rpc.py

141
docs/cog_guides/reports.rst Normal file
View File

@ -0,0 +1,141 @@
.. _reports:
=======
Reports
=======
This is the cog guide for the reports cog. You will
find detailed docs about usage and commands.
``[p]`` is considered as your prefix.
.. note:: To use this cog, load it by typing this::
[p]load reports
.. _reports-usage:
-----
Usage
-----
Create user reports that server staff can respond to.
Users can open reports using ``[p]report``. These are then sent
to a channel in the server for staff, and the report creator
gets a DM. Both can be used to communicate.
.. _reports-commands:
--------
Commands
--------
.. _reports-command-report:
^^^^^^
report
^^^^^^
**Syntax**
.. code-block:: none
[p]report [text]
**Description**
Send a report.
Use without arguments for interactive reporting, or do
``[p]report [text]`` to use it non-interactively.
**Arguments**
* ``[text]``: The content included within the report.
.. _reports-command-report-interact:
"""""""""""""""
report interact
"""""""""""""""
.. note:: |mod-lock|
**Syntax**
.. code-block:: none
[p]report interact <ticket_number>
**Description**
Open a message tunnel.
This tunnel will forward things you say in this channel
to the ticket opener's direct messages.
Tunnels do not persist across bot restarts.
**Arguments**
* ``<ticket_number>``: The ticket number to open the tunnel in.
.. _reports-command-reportset:
^^^^^^^^^
reportset
^^^^^^^^^
.. note:: |admin-lock|
**Syntax**
.. code-block:: none
[p]reportset
**Description**
Manage Reports.
.. _reports-command-reportset-output:
""""""""""""""""
reportset output
""""""""""""""""
.. note:: |admin-lock|
**Syntax**
.. code-block:: none
[p]reportset output <channel>
**Description**
Set the channel where reports will be sent.
**Arguments**
* ``<channel>``: |channel-input|
.. _reports-command-reportset-toggle:
""""""""""""""""
reportset toggle
""""""""""""""""
.. note:: |admin-lock|
**Syntax**
.. code-block:: none
[p]reportset toggle
**Description**
Enable or disable reporting for this server.

View File

@ -45,6 +45,7 @@ Welcome to Red - Discord Bot's documentation!
cog_guides/filter cog_guides/filter
cog_guides/general cog_guides/general
cog_guides/image cog_guides/image
cog_guides/reports
cog_guides/streams cog_guides/streams
cog_guides/trivia cog_guides/trivia
red_core_data_statement red_core_data_statement

View File

@ -114,7 +114,7 @@ class Reports(commands.Cog):
@checks.admin_or_permissions(manage_guild=True) @checks.admin_or_permissions(manage_guild=True)
@reportset.command(name="toggle", aliases=["toggleactive"]) @reportset.command(name="toggle", aliases=["toggleactive"])
async def reportset_toggle(self, ctx: commands.Context): async def reportset_toggle(self, ctx: commands.Context):
"""Enable or Disable reporting for this server.""" """Enable or disable reporting for this server."""
active = await self.config.guild(ctx.guild).active() active = await self.config.guild(ctx.guild).active()
active = not active active = not active
await self.config.guild(ctx.guild).active.set(active) await self.config.guild(ctx.guild).active.set(active)