Fix Component Button Crash When Used With Commands #6

Merged
layla merged 1 commits from bugfix/fixComponentCrashWhenWithCommands into main 2023-06-22 01:45:58 +02:00

View File

@ -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
}