From c025e679ae3d1270015bffec5eb663e17201f901 Mon Sep 17 00:00:00 2001 From: zekro Date: Mon, 15 Aug 2022 12:26:43 +0000 Subject: [PATCH] check interaction type in handler --- ken.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ken.go b/ken.go index c0b8652..5a6a8bb 100644 --- a/ken.go +++ b/ken.go @@ -298,6 +298,10 @@ func (k *Ken) onReady(s *discordgo.Session, e *discordgo.Ready) { } func (k *Ken) onInteractionCreate(s *discordgo.Session, e *discordgo.InteractionCreate) { + if e.Type != discordgo.InteractionApplicationCommand { + return + } + k.cmdsLock.RLock() cmd := k.cmds[e.ApplicationCommandData().Name] k.cmdsLock.RUnlock()