From 12e65345a209834edc81f264a3c732c0a03b5e79 Mon Sep 17 00:00:00 2001 From: vaporvee Date: Sun, 31 Mar 2024 13:40:23 +0200 Subject: [PATCH] fixed crash with tag command --- handlers.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/handlers.go b/handlers.go index 2191268..2ff0245 100644 --- a/handlers.go +++ b/handlers.go @@ -96,7 +96,13 @@ func interactionCreate(s *discordgo.Session, i *discordgo.InteractionCreate) { } else { if command.ModalSubmit != nil { var hasID bool = false - var modalIDs []string = append(command.ModalIDs, command.DynamicModalIDs()...) + var modalIDs []string + if command.ModalIDs != nil { + modalIDs = command.ModalIDs + } + if command.DynamicModalIDs != nil { + modalIDs = append(command.ModalIDs, command.DynamicModalIDs()...) + } for _, modalID := range modalIDs { if strings.HasPrefix(i.ModalSubmitData().CustomID, modalID) { hasID = true