[Docs] Update Cleanup docs with new cleanupset command group (#5245)

* Add cleanupset commands to cleanup docs

* fix spacing

* shown -> sent

* update command docstring

* Fix trailing whitespace and use same style for docs

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
This commit is contained in:
Kreus Amredes 2021-09-07 22:12:46 +01:00 committed by GitHub
parent 33dddaf5b4
commit 63fd7cc95f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 42 additions and 1 deletions

View File

@ -294,3 +294,40 @@ Examples:
- ``<user>`` The user whose messages are to be cleaned up. - ``<user>`` The user whose messages are to be cleaned up.
- ``<number>`` The max number of messages to cleanup. Must be a positive integer. - ``<number>`` The max number of messages to cleanup. Must be a positive integer.
- ``<delete_pinned>`` Whether to delete pinned messages or not. Defaults to False - ``<delete_pinned>`` Whether to delete pinned messages or not. Defaults to False
.. _cleanup-command-cleanupset:
^^^^^^^^^^
cleanupset
^^^^^^^^^^
.. note:: |admin-lock|
**Syntax**
.. code-block:: none
[p]cleanupset
**Description**
Manage the settings for the cleanup command.
.. _cleanup-command-cleanupset-notify:
"""""""""""""""""
cleanupset notify
"""""""""""""""""
**Syntax**
.. code-block:: none
[p]cleanupset notify
**Description**
Toggle clean up notification settings.
When enabled, a message will be sent per cleanup, showing how many messages were deleted.
This message will be deleted after 5 seconds.

View File

@ -733,7 +733,11 @@ class Cleanup(commands.Cog):
@cleanupset.command(name="notify") @cleanupset.command(name="notify")
async def cleanupset_notify(self, ctx: commands.Context): async def cleanupset_notify(self, ctx: commands.Context):
"""Toggle clean up notification settings.""" """Toggle clean up notification settings.
When enabled, a message will be sent per cleanup, showing how many messages were deleted.
This message will be deleted after 5 seconds.
"""
toggle = await self.config.guild(ctx.guild).notify() toggle = await self.config.guild(ctx.guild).notify()
if toggle: if toggle:
await self.config.guild(ctx.guild).notify.set(False) await self.config.guild(ctx.guild).notify.set(False)