Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slash help command #5

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions docs/ext/help_commands/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,21 @@ EmbeddedHelpCommand
.. autoclass:: EmbeddedHelpCommand
:members:

Slash Help Commands
-------------------

SlashHelpCommand
~~~~~~~~~~~~~~~~

.. autoclass:: SlashHelpCommand
:members:

MinimalSlashHelpCommand
~~~~~~~~~~~~~~~~~~~~~~~

.. autoclass:: MinimalSlashHelpCommand
:members:

Exceptions
----------

Expand Down
21 changes: 19 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ To use pagination help commands:

pip install -U nextcord-ext-help-commands[menus]

Basic usage
-----------
Basic help command usage
------------------------

.. code:: py

Expand All @@ -37,6 +37,23 @@ Basic usage

bot.run("token")

Slash help command usage
------------------------

.. code:: py

from nextcord.ext import commands
from nextcord.ext import help_commands

# An instance of nextcord.Client may be used instead of commands.Bot
bot = commands.Bot()

# Pass your Bot or Client instance to the add_to_client method
help_commands.MinimalSlashHelpCommand().add_to_client(bot)

bot.run("token")


Contents
--------

Expand Down
5 changes: 4 additions & 1 deletion nextcord/ext/help_commands/__init__.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
from .embedded import EmbeddedHelpCommand
from .errors import MissingDependencyError
from .paginated import PaginatedHelpCommand
from .slash import MinimalSlashHelpCommand, SlashHelpCommand

# Needed for the setup.py script
__version__ = "0.0.1"

__all__ = (
"EmbeddedHelpCommand",
"MinimalSlashHelpCommand",
"MissingDependencyError",
"PaginatedHelpCommand",
"EmbeddedHelpCommand",
"SlashHelpCommand",
)
Loading