Cogs
The cogs of this package implement some basics and utils commands: help commands, utils commands for the application's owner.
Help
A cog which implement help commands and methods to build the help message.
Parameters
Parameter
Type
Description
Required
Default
bot
The Bot instance which use the cog
✔️
max_cmd_by_page
int
The maximum of commands by help page. Used for the global help command.
❌
8
Attributes
Attributes of discord.ext.commands.Cog
+
Name
Type
Description
bot
The Bot instance which use the cog
max_cmd_by_page
int
The maximum of commands by help page. Used for the global help command.
Methods
Methods of Cog +
_
base_embed
: a method to create a base embed for help commands. This embed is created with a thumbnail.Parameters
title
: str - The title of Embed(
description
) : str - The description of Embed(
author
) : discord.User - author of Embed
Returns
embed
: discord.Embed - the embed instance
The method base_embed
can be use to create an Embed with avatar of bot in thumbnail and the author of command.
_command_base
: a method to create a base help for a command. Used for the global help command.Paramters
cmd
: discord.ext.commands.Command - The command
Returns
str - The base help for the command. By default, included the description, the name and the brief of command.
_command_usage
: a method to create an usage message for a commandParameters
cmd
: discord.ext.commands.Command - The command
Returns : str - usage of the command if it's exist else an empty string.
_command_aliases
: a method to create aliases message for a command.Parameters
cmd
: discord.ext.commands.Command - The command
Returns : str - aliases of the command if it's exist else an empty string.
_command_help_fmt
: method to format the help message for a command. This method join the result of_command_base
,_command_usage and _command_aliases
methods.Parameters
cmd
: discord.ext.commands.Command - The command
Returns : str - The help message for the command
first_page
: method to create the first page (embed) of global help commandParameters
(author) : discord.User - The author of command
Returns : discord.Embed - embed for the first page of global help commands
To customize the first page of help command. You can overwrite the first_page
method. This method must returns an Embed.
commands_pages
: method to create the help pages (embed) for commandsParameters
(author) : discord.User - The author of command.
Returns : List[discord.Embed ] - The list of page (embed) for this group of commands.
To customize the structure of pages for the help command. You can overwrite the method. This method must returns a list of Embed.
Commands
There is not commands
Slash Commands
help
all
: Show a help on all commands in an embed multi pages. This commands usefirst_page
andcommands_pages to build pages.
command
:
Get help for a scpecific command.category
: Get help for a category of commands
Commands which have the attribute hidden = True
aren't displayed.
You shouldn't overwrite the method which implement this command.
Subcommands command
and category
are not implemented.
Owner
A cog which implement utils commands for the application's owner.
Parameters
Parameter
Type
Description
Required
Default
bot
The Bot instance which use the cog
✔️
Attributes
Attributes of discord.ext.commands.Cog
+
Name
Type
Description
bot
The Bot instance which use the cog
Methods
Commands
stopBot
: A command to disconnect the bot.
All commands of this Cog are created with attribute hidden=True
Slash Commands
There is not slash commands
Last updated
Was this helpful?