Fix Component Button Crash When Used With Commands

This commit is contained in:
Layla 2023-06-21 19:44:49 -04:00
parent 6ceceba221
commit 81a3f0c3bb

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
}