Add improved docs for slash commands (#77)

* Fix command checks actually working

* Current progress on slash command docs

* Improve docs for slash commands further
This commit is contained in:
Gnome!
2021-09-27 09:14:07 +01:00
committed by GitHub
parent d16d2d856f
commit 3260ec6643
7 changed files with 172 additions and 66 deletions

View File

@@ -132,7 +132,7 @@ application_option_type_lookup = {
discord.Member,
discord.User,
): 6, # Preferably discord.abc.User, but 'Protocols with non-method members don't support issubclass()'
(discord.abc.GuildChannel, discord.DMChannel): 7,
(discord.abc.GuildChannel, discord.Thread): 7,
discord.Role: 8,
float: 10,
}
@@ -330,11 +330,16 @@ class Command(_BaseCommand, Generic[CogT, P, T]):
This overwrites the global ``slash_commands`` parameter of :class:`.Bot`.
.. versionadded:: 2.0
slash_command_guilds: Optional[:class:`List[int]`]
slash_command_guilds: Optional[List[:class:`int`]]
If this is set, only upload this slash command to these guild IDs.
This overwrites the global ``slash_command_guilds`` parameter of :class:`.Bot`.
.. versionadded:: 2.0
option_descriptions: Dict[:class:`str`, :class:`str`]
The unpacked option descriptions from :class:`.Option`.
.. versionadded:: 2.0
"""
__original_kwargs__: Dict[str, Any]