Skip to content

Commit

Permalink
nothing to see here
Browse files Browse the repository at this point in the history
  • Loading branch information
topi314 committed Jan 10, 2022
1 parent e7278b7 commit 8bba4eb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
13 changes: 5 additions & 8 deletions core/entity_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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,
},
Expand Down
3 changes: 2 additions & 1 deletion core/interaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 8bba4eb

Please sign in to comment.