Skip to content

Commit

Permalink
Fix Component Button Crash When Used With Commands (!6)
Browse files Browse the repository at this point in the history
  • Loading branch information
Layla and yeslayla committed Jun 21, 2023
1 parent 6ceceba commit ca9a183
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion discord/discord.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func (discord *Discord) Run() error {

// Register command handler
discord.session.AddHandler(func(session *discordgo.Session, i *discordgo.InteractionCreate) {
if i.GuildID != discord.guildID {
if i.GuildID != discord.guildID || i.Interaction.Type != discordgo.InteractionApplicationCommand {
return
}

Expand Down

0 comments on commit ca9a183

Please sign in to comment.