Skip to content

Commit

Permalink
document interaction channel field
Browse files Browse the repository at this point in the history
  • Loading branch information
devsnek committed Apr 3, 2023
1 parent 294b3ec commit af3308c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 6 additions & 0 deletions docs/Change_Log.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change Log

#### April 3, 2023

## Interaction Channel Data

Interactions now contain a `channel` field which is a partial channel object and guaranteed to contain `id` and `type`. We recommend that you begin using this channel field to identify the source channel of the interaction, and may deprecate the existing `channel_id` field in the future. See the [interaction documentation](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object) for more details.

## Add Auto Moderation custom_message Action Metadata Field

#### Feb 24, 2023
Expand Down
5 changes: 3 additions & 2 deletions docs/interactions/Receiving_and_Responding.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ For [Slash Commands](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/slash-commands), it

For [User Commands](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/user-commands) and [Message Commands](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/message-commands), it includes the resolved user or message on which the action was taken.

For [Message Components](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/) it includes identifying information about the component that was used. It will also include some metadata about how the interaction was triggered: the `guild_id`, `channel_id`, `member` and other fields. You can find all the values in our data models below.
For [Message Components](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/) it includes identifying information about the component that was used. It will also include some metadata about how the interaction was triggered: the `guild_id`, `channel`, `member` and other fields. You can find all the values in our data models below.

### Interaction Object

Expand All @@ -19,7 +19,8 @@ For [Message Components](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/) it includes ide
| type | [interaction type](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object-interaction-type) | Type of interaction |
| data?\* | [interaction data](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/interaction-object-interaction-data) | Interaction data payload |
| guild_id? | snowflake | Guild that the interaction was sent from |
| channel_id? | snowflake | Channel that the interaction was sent from |
| channel? | [partial channel](#DOCS_RESOURCES_CHANNEL/channel-object) object | Channel that the interaction was sent from |
| channel_id? | snowflake | Channel that the interaction was sent from (deprecated) |
| member?\*\* | [guild member](#DOCS_RESOURCES_GUILD/guild-member-object) object | Guild member data for the invoking user, including permissions |
| user? | [user](#DOCS_RESOURCES_USER/user-object) object | User object for the invoking user, if invoked in a DM |
| token | string | Continuation token for responding to the interaction |
Expand Down

0 comments on commit af3308c

Please sign in to comment.