|
|
@ -74,6 +74,7 @@ __all__ = ( |
|
|
|
'EmojiConverter', |
|
|
|
'PartialEmojiConverter', |
|
|
|
'CategoryChannelConverter', |
|
|
|
'ForumChannelConverter', |
|
|
|
'IDConverter', |
|
|
|
'ThreadConverter', |
|
|
|
'GuildChannelConverter', |
|
|
@ -580,6 +581,25 @@ class ThreadConverter(IDConverter[discord.Thread]): |
|
|
|
return GuildChannelConverter._resolve_thread(ctx, argument, 'threads', discord.Thread) |
|
|
|
|
|
|
|
|
|
|
|
class ForumChannelConverter(IDConverter[discord.ForumChannel]): |
|
|
|
"""Converts to a :class:`~discord.ForumChannel`. |
|
|
|
|
|
|
|
All lookups are via the local guild. If in a DM context, then the lookup |
|
|
|
is done by the global cache. |
|
|
|
|
|
|
|
The lookup strategy is as follows (in order): |
|
|
|
|
|
|
|
1. Lookup by ID. |
|
|
|
2. Lookup by mention. |
|
|
|
3. Lookup by name |
|
|
|
|
|
|
|
.. versionadded:: 2.0 |
|
|
|
""" |
|
|
|
|
|
|
|
async def convert(self, ctx: Context[BotT], argument: str) -> discord.ForumChannel: |
|
|
|
return GuildChannelConverter._resolve_channel(ctx, argument, 'forums', discord.ForumChannel) |
|
|
|
|
|
|
|
|
|
|
|
class ColourConverter(Converter[discord.Colour]): |
|
|
|
"""Converts to a :class:`~discord.Colour`. |
|
|
|
|
|
|
|