Browse Source

[commands] Add missing attributetable to classes

pull/8429/head
Puncher 3 years ago
committed by GitHub
parent
commit
64744a4938
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      discord/ext/commands/converter.py
  2. 56
      docs/ext/commands/api.rst

4
discord/ext/commands/converter.py

@ -567,7 +567,7 @@ class CategoryChannelConverter(IDConverter[discord.CategoryChannel]):
class ThreadConverter(IDConverter[discord.Thread]): class ThreadConverter(IDConverter[discord.Thread]):
"""Coverts to a :class:`~discord.Thread`. """Converts to a :class:`~discord.Thread`.
All lookups are via the local guild. All lookups are via the local guild.
@ -676,7 +676,7 @@ class RoleConverter(IDConverter[discord.Role]):
class GameConverter(Converter[discord.Game]): class GameConverter(Converter[discord.Game]):
"""Converts to :class:`~discord.Game`.""" """Converts to a :class:`~discord.Game`."""
async def convert(self, ctx: Context[BotT], argument: str) -> discord.Game: async def convert(self, ctx: Context[BotT], argument: str) -> discord.Game:
return discord.Game(name=argument) return discord.Game(name=argument)

56
docs/ext/commands/api.rst

@ -421,77 +421,127 @@ Context
Converters Converters
------------ ------------
.. attributetable:: discord.ext.commands.Converter
.. autoclass:: discord.ext.commands.Converter .. autoclass:: discord.ext.commands.Converter
:members: :members:
.. attributetable:: discord.ext.commands.ObjectConverter
.. autoclass:: discord.ext.commands.ObjectConverter .. autoclass:: discord.ext.commands.ObjectConverter
:members: :members:
.. attributetable:: discord.ext.commands.MemberConverter
.. autoclass:: discord.ext.commands.MemberConverter .. autoclass:: discord.ext.commands.MemberConverter
:members: :members:
.. attributetable:: discord.ext.commands.UserConverter
.. autoclass:: discord.ext.commands.UserConverter .. autoclass:: discord.ext.commands.UserConverter
:members: :members:
.. attributetable:: discord.ext.commands.MessageConverter
.. autoclass:: discord.ext.commands.MessageConverter .. autoclass:: discord.ext.commands.MessageConverter
:members: :members:
.. attributetable:: discord.ext.commands.PartialMessageConverter
.. autoclass:: discord.ext.commands.PartialMessageConverter .. autoclass:: discord.ext.commands.PartialMessageConverter
:members: :members:
.. attributetable:: discord.ext.commands.GuildChannelConverter
.. autoclass:: discord.ext.commands.GuildChannelConverter .. autoclass:: discord.ext.commands.GuildChannelConverter
:members: :members:
.. attributetable:: discord.ext.commands.TextChannelConverter
.. autoclass:: discord.ext.commands.TextChannelConverter .. autoclass:: discord.ext.commands.TextChannelConverter
:members: :members:
.. attributetable:: discord.ext.commands.VoiceChannelConverter
.. autoclass:: discord.ext.commands.VoiceChannelConverter .. autoclass:: discord.ext.commands.VoiceChannelConverter
:members: :members:
.. attributetable:: discord.ext.commands.StageChannelConverter
.. autoclass:: discord.ext.commands.StageChannelConverter .. autoclass:: discord.ext.commands.StageChannelConverter
:members: :members:
.. attributetable:: discord.ext.commands.CategoryChannelConverter
.. autoclass:: discord.ext.commands.CategoryChannelConverter .. autoclass:: discord.ext.commands.CategoryChannelConverter
:members: :members:
.. attributetable:: discord.ext.commands.ForumChannelConverter
.. autoclass:: discord.ext.commands.ForumChannelConverter .. autoclass:: discord.ext.commands.ForumChannelConverter
:members: :members:
.. attributetable:: discord.ext.commands.InviteConverter
.. autoclass:: discord.ext.commands.InviteConverter .. autoclass:: discord.ext.commands.InviteConverter
:members: :members:
.. attributetable:: discord.ext.commands.GuildConverter
.. autoclass:: discord.ext.commands.GuildConverter .. autoclass:: discord.ext.commands.GuildConverter
:members: :members:
.. attributetable:: discord.ext.commands.RoleConverter
.. autoclass:: discord.ext.commands.RoleConverter .. autoclass:: discord.ext.commands.RoleConverter
:members: :members:
.. attributetable:: discord.ext.commands.GameConverter
.. autoclass:: discord.ext.commands.GameConverter .. autoclass:: discord.ext.commands.GameConverter
:members: :members:
.. attributetable:: discord.ext.commands.ColourConverter
.. autoclass:: discord.ext.commands.ColourConverter .. autoclass:: discord.ext.commands.ColourConverter
:members: :members:
.. attributetable:: discord.ext.commands.EmojiConverter
.. autoclass:: discord.ext.commands.EmojiConverter .. autoclass:: discord.ext.commands.EmojiConverter
:members: :members:
.. attributetable:: discord.ext.commands.PartialEmojiConverter
.. autoclass:: discord.ext.commands.PartialEmojiConverter .. autoclass:: discord.ext.commands.PartialEmojiConverter
:members: :members:
.. attributetable:: discord.ext.commands.ThreadConverter
.. autoclass:: discord.ext.commands.ThreadConverter .. autoclass:: discord.ext.commands.ThreadConverter
:members: :members:
.. attributetable:: discord.ext.commands.GuildStickerConverter
.. autoclass:: discord.ext.commands.GuildStickerConverter .. autoclass:: discord.ext.commands.GuildStickerConverter
:members: :members:
.. attributetable:: discord.ext.commands.ScheduledEventConverter
.. autoclass:: discord.ext.commands.ScheduledEventConverter .. autoclass:: discord.ext.commands.ScheduledEventConverter
:members: :members:
.. attributetable:: discord.ext.commands.clean_content
.. autoclass:: discord.ext.commands.clean_content .. autoclass:: discord.ext.commands.clean_content
:members: :members:
.. attributetable:: discord.ext.commands.Greedy
.. autoclass:: discord.ext.commands.Greedy() .. autoclass:: discord.ext.commands.Greedy()
.. attributetable:: discord.ext.commands.Range
.. autoclass:: discord.ext.commands.Range() .. autoclass:: discord.ext.commands.Range()
.. autofunction:: discord.ext.commands.run_converters .. autofunction:: discord.ext.commands.run_converters
@ -499,9 +549,13 @@ Converters
Flag Converter Flag Converter
~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~
.. attributetable:: discord.ext.commands.FlagConverter
.. autoclass:: discord.ext.commands.FlagConverter .. autoclass:: discord.ext.commands.FlagConverter
:members: :members:
.. attributetable:: discord.ext.commands.Flag
.. autoclass:: discord.ext.commands.Flag() .. autoclass:: discord.ext.commands.Flag()
:members: :members:
@ -511,6 +565,8 @@ Flag Converter
Defaults Defaults
-------- --------
.. attributetable:: discord.ext.commands.Parameter
.. autoclass:: discord.ext.commands.Parameter() .. autoclass:: discord.ext.commands.Parameter()
:members: :members:

Loading…
Cancel
Save