feat: schedule rework

This commit is contained in:
2026-08-18 19:22:21 +01:00
parent 483dc666d1
commit 5024af2789
13 changed files with 997 additions and 392 deletions
+12 -1
View File
@@ -1,6 +1,7 @@
package commands
import (
"strings"
"velox-bot/internal/commands/config"
"velox-bot/internal/commands/fun"
"velox-bot/internal/commands/help"
@@ -72,8 +73,18 @@ func HandleInteraction(s *discordgo.Session, i *discordgo.InteractionCreate) {
}
case discordgo.InteractionMessageComponent:
data := i.MessageComponentData()
if len(data.CustomID) >= 6 && data.CustomID[:6] == "music:" {
switch {
case strings.HasPrefix(data.CustomID, "music:"):
music.HandleComponent(s, i)
case strings.HasPrefix(data.CustomID, "schedule:"):
schedule.HandleComponent(s, i)
}
case discordgo.InteractionModalSubmit:
data := i.ModalSubmitData()
switch {
case strings.HasPrefix(data.CustomID, "schedule:"):
schedule.HandleModalSubmit(s, i)
}
}
}