Reorganise documentation for interactions

This commit is contained in:
Rapptz committed 2022-03-04 21:17:27 -05:00
1 parent 41f2792ed9
commit aa74238053
14 files changed
+628 -410

No files matched your search

+22 -22
View File
@@ -31,8 +31,8 @@ from ..object import Object
from ..role import Role
from ..message import Message, Attachment
from ..channel import PartialMessageable
from ..enums import AppCommandOptionType
from .models import AppCommandChannel, AppCommandThread
from .enums import AppCommandOptionType
if TYPE_CHECKING:
from ..types.interactions import ResolvedData, ApplicationCommandInteractionDataOption
@@ -84,27 +84,27 @@ class Namespace:
This namespace object converts resolved objects into their appropriate form depending on their
type. Consult the table below for conversion information.
+------------------------------------------+-------------------------------------------------------------------------------+
| Option Type | Resolved Type |
+==========================================+===============================================================================+
| :attr:`AppCommandOptionType.string` | :class:`str` |
+------------------------------------------+-------------------------------------------------------------------------------+
| :attr:`AppCommandOptionType.integer` | :class:`int` |
+------------------------------------------+-------------------------------------------------------------------------------+
| :attr:`AppCommandOptionType.boolean` | :class:`bool` |
+------------------------------------------+-------------------------------------------------------------------------------+
| :attr:`AppCommandOptionType.number` | :class:`float` |
+------------------------------------------+-------------------------------------------------------------------------------+
| :attr:`AppCommandOptionType.user` | :class:`~discord.User` or :class:`~discord.Member` |
+------------------------------------------+-------------------------------------------------------------------------------+
| :attr:`AppCommandOptionType.channel` | :class:`.AppCommandChannel` or :class:`.AppCommandThread` |
+------------------------------------------+-------------------------------------------------------------------------------+
| :attr:`AppCommandOptionType.role` | :class:`~discord.Role` |
+------------------------------------------+-------------------------------------------------------------------------------+
| :attr:`AppCommandOptionType.mentionable` | :class:`~discord.User` or :class:`~discord.Member`, or :class:`~discord.Role` |
+------------------------------------------+-------------------------------------------------------------------------------+
| :attr:`AppCommandOptionType.attachment` | :class:`~discord.Attachment` |
+------------------------------------------+-------------------------------------------------------------------------------+
+-------------------------------------------+-------------------------------------------------------------------------------+
| Option Type | Resolved Type |
+===========================================+===============================================================================+
| :attr:`.AppCommandOptionType.string` | :class:`str` |
+-------------------------------------------+-------------------------------------------------------------------------------+
| :attr:`.AppCommandOptionType.integer` | :class:`int` |
+-------------------------------------------+-------------------------------------------------------------------------------+
| :attr:`.AppCommandOptionType.boolean` | :class:`bool` |
+-------------------------------------------+-------------------------------------------------------------------------------+
| :attr:`.AppCommandOptionType.number` | :class:`float` |
+-------------------------------------------+-------------------------------------------------------------------------------+
| :attr:`.AppCommandOptionType.user` | :class:`~discord.User` or :class:`~discord.Member` |
+-------------------------------------------+-------------------------------------------------------------------------------+
| :attr:`.AppCommandOptionType.channel` | :class:`.AppCommandChannel` or :class:`.AppCommandThread` |
+-------------------------------------------+-------------------------------------------------------------------------------+
| :attr:`.AppCommandOptionType.role` | :class:`~discord.Role` |
+-------------------------------------------+-------------------------------------------------------------------------------+
| :attr:`.AppCommandOptionType.mentionable` | :class:`~discord.User` or :class:`~discord.Member`, or :class:`~discord.Role` |
+-------------------------------------------+-------------------------------------------------------------------------------+
| :attr:`.AppCommandOptionType.attachment` | :class:`~discord.Attachment` |
+-------------------------------------------+-------------------------------------------------------------------------------+
"""
def __init__(