From ddc0d139b8fdd1dee5df9a091091bb105f81279c Mon Sep 17 00:00:00 2001 From: Mason Sciotti Date: Wed, 3 Mar 2021 11:09:08 -0800 Subject: [PATCH] new message field --- docs/interactions/Slash_Commands.md | 11 +++++++++++ docs/resources/Channel.md | 1 + 2 files changed, 12 insertions(+) diff --git a/docs/interactions/Slash_Commands.md b/docs/interactions/Slash_Commands.md index adf3e0f462..1187292e99 100644 --- a/docs/interactions/Slash_Commands.md +++ b/docs/interactions/Slash_Commands.md @@ -877,3 +877,14 @@ Not all message fields are currently supported. | embeds? | array of [embeds](#DOCS_RESOURCES_CHANNEL/embed-object) | supports up to 10 embeds | | allowed_mentions? | allowed mentions | [allowed mentions](#DOCS_RESOURCES_CHANNEL/allowed-mentions-object) object | | flags? | int | set to `64` to make your response ephemeral | + +## MessageInteraction + +This is sent on the [message object](#DOCS_RESOURCES_CHANNEL/message-object) when the message is a response to an Interaction. + +| Name | Value | Description | +| --- | --- | --- | +| id | snowflake | id of the interaction | +| type | InteractionType | the type of interaction | +| name | string | the name of the [ApplicationCommand](#DOCS_INTERACTIONS_SLASH_COMMANDS/applicationcommand) | +| user | [user object](#DOCS_RESOURCES_USER/user-object) | the user who invoked the interaction | diff --git a/docs/resources/Channel.md b/docs/resources/Channel.md index 84c6279625..8239072ada 100644 --- a/docs/resources/Channel.md +++ b/docs/resources/Channel.md @@ -204,6 +204,7 @@ Represents a message sent in a channel within Discord. | flags? | integer | [message flags](#DOCS_RESOURCES_CHANNEL/message-object-message-flags) combined as a [bitfield](https://en.wikipedia.org/wiki/Bit_field) | | stickers? | array of [sticker](#DOCS_RESOURCES_CHANNEL/message-object-message-sticker-structure) objects | the stickers sent with the message (bots currently can only receive messages with stickers, not send) | | referenced_message?\*\*\*\*\* | ?[message object](#DOCS_RESOURCES_CHANNEL/message-object) | the message associated with the message_reference | +| interaction? | [message interaction object](#DOCS_INTERACTIONS_SLASH_COMMANDS/messageinteraction) | sent if the message is a response to an [Interaction](#DOCS_INTERACTIONS_SLASH_COMMANDS/) | \* The author object follows the structure of the user object, but is only a valid user in the case where the message is generated by a user or bot user. If the message is generated by a webhook, the author object corresponds to the webhook's id, username, and avatar. You can tell if a message is generated by a webhook by checking for the `webhook_id` on the message object.