Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add InteractionMetadata target fields #397

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 17 additions & 8 deletions discord/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -521,14 +521,23 @@ type RoleSubscriptionData struct {
}

type InteractionMetadata struct {
ID snowflake.ID `json:"id"`
Type InteractionType `json:"type"`
User User `json:"user"`
AuthorizingIntegrationOwners map[ApplicationIntegrationType]snowflake.ID `json:"authorizing_integration_owners"`
OriginalResponseMessageID *snowflake.ID `json:"original_response_message_id"`
Name *string `json:"name"`
InteractedMessageID *snowflake.ID `json:"interacted_message_id"`
TriggeringInteractionMetadata *InteractionMetadata `json:"triggering_interaction_metadata"`
ID snowflake.ID `json:"id"`
Type InteractionType `json:"type"`
User User `json:"user"`
AuthorizingIntegrationOwners map[ApplicationIntegrationType]snowflake.ID `json:"authorizing_integration_owners"`
OriginalResponseMessageID *snowflake.ID `json:"original_response_message_id"`
// This field will only be present for application command interactions of ApplicationCommandTypeUser.
// See https://discord.com/developers/docs/resources/message#message-interaction-metadata-object-application-command-interaction-metadata-structure
TargetUser *User `json:"target_user"`
// This field will only be present for application command interactions of ApplicationCommandTypeMessage.
// See https://discord.com/developers/docs/resources/message#message-interaction-metadata-object-message-command-interaction-metadata-structure
TargetMessageID *snowflake.ID `json:"target_message_id"`
// This field will only be present for InteractionTypeComponent interactions.
// See https://discord.com/developers/docs/resources/message#message-interaction-metadata-object-message-component-interaction-metadata-structure
InteractedMessageID *snowflake.ID `json:"interacted_message_id"`
// This field will only be present for InteractionTypeModalSubmit interactions.
// See https://discord.com/developers/docs/resources/message#message-interaction-metadata-object-modal-submit-interaction-metadata-structure
TriggeringInteractionMetadata *InteractionMetadata `json:"triggering_interaction_metadata"`
}

type MessageCall struct {
Expand Down
Loading