feat: ideashow command with interactive controls and todo management

This commit is contained in:
Space-Banane
2026-01-23 13:40:02 +01:00
parent 151c250e62
commit 99281d209a
4 changed files with 978 additions and 4 deletions

View File

@@ -3,6 +3,7 @@ package commands
import (
"fmt"
"log"
"strings"
"github.com/bwmarrin/discordgo"
)
@@ -24,6 +25,7 @@ func getAllCommands() []*Cmd {
newLogoutCommand(),
newListCommand(),
newDeleteCommand(),
newIdeashowCommand(),
}
}
@@ -66,6 +68,17 @@ func HandleInteraction(s *discordgo.Session, ic *discordgo.InteractionCreate) {
data := ic.ModalSubmitData()
if data.CustomID == "setup_modal" {
handleSetupSubmit(s, ic)
} else if strings.HasPrefix(data.CustomID, "ideashow_add_todo_modal_") {
handleAddTodoSubmit(s, ic)
}
case discordgo.InteractionMessageComponent:
handleComponent(s, ic)
}
}
func handleComponent(s *discordgo.Session, ic *discordgo.InteractionCreate) {
data := ic.MessageComponentData()
if strings.HasPrefix(data.CustomID, "ideashow_") {
handleIdeashowComponent(s, ic)
}
}