Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
sebm253 committed Apr 6, 2023
1 parent 4193750 commit a6ef638
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions events/interaction_events.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func (e *ApplicationCommandInteractionCreate) Guild() (discord.Guild, bool) {
// Channel returns the discord.GuildMessageChannel that the interaction happened in.
// This only returns cached channels.
func (e *ApplicationCommandInteractionCreate) Channel() (discord.GuildMessageChannel, bool) {
return e.Client().Caches().GuildMessageChannel(e.ChannelID())
return e.Client().Caches().GuildMessageChannel(e.ApplicationCommandInteraction.Channel().ID)
}

// CreateMessage responds to the interaction with a new message.
Expand Down Expand Up @@ -93,7 +93,7 @@ func (e *ComponentInteractionCreate) Guild() (discord.Guild, bool) {
// Channel returns the discord.GuildMessageChannel that the interaction happened in.
// This only returns cached channels.
func (e *ComponentInteractionCreate) Channel() (discord.GuildMessageChannel, bool) {
return e.Client().Caches().GuildMessageChannel(e.ChannelID())
return e.Client().Caches().GuildMessageChannel(e.ComponentInteraction.Channel().ID)
}

// CreateMessage responds to the interaction with a new message.
Expand Down Expand Up @@ -145,7 +145,7 @@ func (e *AutocompleteInteractionCreate) Guild() (discord.Guild, bool) {
// Channel returns the discord.GuildMessageChannel that the interaction happened in.
// This only returns cached channels.
func (e *AutocompleteInteractionCreate) Channel() (discord.GuildMessageChannel, bool) {
return e.Client().Caches().GuildMessageChannel(e.ChannelID())
return e.Client().Caches().GuildMessageChannel(e.AutocompleteInteraction.Channel().ID)
}

// Result responds to the interaction with a slice of choices.
Expand Down Expand Up @@ -173,7 +173,7 @@ func (e *ModalSubmitInteractionCreate) Guild() (discord.Guild, bool) {
// Channel returns the discord.GuildMessageChannel that the interaction happened in.
// This only returns cached channels.
func (e *ModalSubmitInteractionCreate) Channel() (discord.GuildMessageChannel, bool) {
return e.Client().Caches().GuildMessageChannel(e.ChannelID())
return e.Client().Caches().GuildMessageChannel(e.ModalSubmitInteraction.Channel().ID)
}

// CreateMessage responds to the interaction with a new message.
Expand Down

0 comments on commit a6ef638

Please sign in to comment.