diff --git a/core/entity_builder.go b/core/entity_builder.go index 1981231e..279985f1 100644 --- a/core/entity_builder.go +++ b/core/entity_builder.go @@ -231,16 +231,14 @@ func (b *entityBuilderImpl) CreateInteraction(interaction discord.Interaction, c interactionData = data } return &ApplicationCommandInteraction{ - ApplicationCommandInteraction: i, - ReplyInteraction: &ReplyInteraction{BaseInteraction: b.baseInteraction(i.BaseInteraction, c, updateCache)}, - Data: interactionData, + ReplyInteraction: &ReplyInteraction{BaseInteraction: b.baseInteraction(i.BaseInteraction, c, updateCache)}, + Data: interactionData, } case discord.ComponentInteraction: componentInteraction := &ComponentInteraction{ - ComponentInteraction: i, - ReplyInteraction: &ReplyInteraction{BaseInteraction: b.baseInteraction(i.BaseInteraction, c, updateCache)}, - Message: b.CreateMessage(i.Message, updateCache), + ReplyInteraction: &ReplyInteraction{BaseInteraction: b.baseInteraction(i.BaseInteraction, c, updateCache)}, + Message: b.CreateMessage(i.Message, updateCache), } switch d := i.Data.(type) { case discord.ButtonInteractionData: @@ -259,8 +257,7 @@ func (b *entityBuilderImpl) CreateInteraction(interaction discord.Interaction, c case discord.AutocompleteInteraction: autocompleteInteraction := &AutocompleteInteraction{ - AutocompleteInteraction: i, - BaseInteraction: b.baseInteraction(i.BaseInteraction, c, updateCache), + BaseInteraction: b.baseInteraction(i.BaseInteraction, c, updateCache), Data: AutocompleteInteractionData{ AutocompleteInteractionData: i.Data, }, diff --git a/core/interaction.go b/core/interaction.go index d0606185..8fa3903b 100644 --- a/core/interaction.go +++ b/core/interaction.go @@ -9,7 +9,8 @@ type InteractionFilter func(interaction Interaction) bool // Interaction represents a generic Interaction received from discord type Interaction interface { - discord.Interaction + Type() discord.InteractionType + interaction() Respond(callbackType discord.InteractionCallbackType, callbackData discord.InteractionCallbackData, opts ...rest.RequestOpt) error }