Skip to content

Commit

Permalink
chore(Interaction): remove authorizing_integration_owners workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
FedorLap2006 committed Jun 20, 2024
1 parent 9e879ff commit 879979c
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions interactions.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,8 +261,7 @@ type interaction Interaction

type rawInteraction struct {
interaction
Data json.RawMessage `json:"data"`
AuthorizingIntegrationOwners map[ApplicationIntegrationType]json.Number `json:"authorizing_integration_owners"`
Data json.RawMessage `json:"data"`
}

// UnmarshalJSON is a method for unmarshalling JSON object to Interaction.
Expand All @@ -275,13 +274,6 @@ func (i *Interaction) UnmarshalJSON(raw []byte) error {

*i = Interaction(tmp.interaction)

// TODO: remove when https://github.com/discord/discord-api-docs/issues/6730 is fixed.
authIntegrationOwners := make(map[ApplicationIntegrationType]string)
for k, v := range tmp.AuthorizingIntegrationOwners {
authIntegrationOwners[k] = v.String()
}
i.AuthorizingIntegrationOwners = authIntegrationOwners

switch tmp.Type {
case InteractionApplicationCommand, InteractionApplicationCommandAutocomplete:
v := ApplicationCommandInteractionData{}
Expand Down

0 comments on commit 879979c

Please sign in to comment.