aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site
diff options
context:
space:
mode:
authorGravatar Diabolical5777 <[email protected]>2022-03-19 17:03:55 +0400
committerGravatar Diabolical5777 <[email protected]>2022-03-19 17:03:55 +0400
commit939aa26d0b2788b84b35e434cfefa287b28b3428 (patch)
treefc5b4efe1d780d78e38db2bbfdf44de23e9a4b06 /pydis_site
parentAdd custom help command (diff)
Add custom help command
Diffstat (limited to 'pydis_site')
-rw-r--r--pydis_site/apps/content/resources/guides/python-guides/discordpy_help_command.md12
1 files changed, 8 insertions, 4 deletions
diff --git a/pydis_site/apps/content/resources/guides/python-guides/discordpy_help_command.md b/pydis_site/apps/content/resources/guides/python-guides/discordpy_help_command.md
index f2c672af..58d75918 100644
--- a/pydis_site/apps/content/resources/guides/python-guides/discordpy_help_command.md
+++ b/pydis_site/apps/content/resources/guides/python-guides/discordpy_help_command.md
@@ -1,13 +1,17 @@
-# Custom Help Command
+---
+title: Custom Help Command
+description: "Overwrite discord.py's help command to implement custom functionality"
+---
+# Custom Help Command
-### First, a [basic walkthrough](https://gist.github.com/InterStella0/b78488fb28cadf279dfd3164b9f0cf96) by Stella#2000 on subclassing the HelpCommand will provide some foundational knowledge required before attempting a more customizable help command.
+ First, a [basic walkthrough](https://gist.github.com/InterStella0/b78488fb28cadf279dfd3164b9f0cf96) by Stella#2000 on subclassing the HelpCommand will provide some foundational knowledge required before attempting a more customizable help command.
---
## Custom Subclass of Help Command
-### If this does not fit your needs and you require a more customizable help command, you can subclass HelpCommand and add individual command details. Below is a basic demonstration:
+If this does not fit your needs and you require a more customizable help command, you can subclass HelpCommand and add individual command details. Below is a basic demonstration:
```python
class MyHelpCommand(commands.HelpCommand):
@@ -19,7 +23,7 @@ class MyHelpCommand(commands.HelpCommand):
bot.help_command = MyHelpCommand()
```
---
-### You can handle when there is no command and make a fancy embed; a page that describes the bot and shows a list of commands is usually ideal here, however if a command is passed in, you can get display detailed information of the command with reference from the following documentations below:
+You can handle when there is no command and make a fancy embed; a page that describes the bot and shows a list of commands is usually ideal here, however if a command is passed in, you can get display detailed information of the command with reference from the following documentations below:
* [Get the command object](https://discordpy.readthedocs.io/en/latest/ext/commands/api.html#discord.ext.commands.Bot.get_command)