Commands for everything a dashboard can do
- /music skip, pause, resume, stop, repeat, remove, move (DJ role) - /config view, clear, toggletwitch, streamers, beta-features (server owner) - /slvl status, remove-reward; /moderation bans, timeouts; /security history - /beta is now the bot owner's DM-only command: set, off, servers, remove-server, status - betasettings service and repo methods, with integration tests Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This commit is contained in:
1 parent
acdb5ead35
commit
132a2cd986
26 files changed
+1062
-65
No files matched your search
+7
-4
@@ -9,7 +9,6 @@ import (
|
||||
"time"
|
||||
"velox-bot/internal/beta"
|
||||
"velox-bot/internal/commands"
|
||||
"velox-bot/internal/commands/betacmd"
|
||||
"velox-bot/internal/db/repos/musicrepo"
|
||||
"velox-bot/internal/db/services"
|
||||
"velox-bot/internal/events"
|
||||
@@ -121,6 +120,13 @@ func (b *Bot) Start() error {
|
||||
}
|
||||
}
|
||||
|
||||
// The owner's commands live in direct messages with the bot, not in a server.
|
||||
for _, cmd := range commands.OwnerCommands {
|
||||
if _, err := b.Session.ApplicationCommandCreate(b.AppID, "", cmd); err != nil {
|
||||
log.Printf("Cannot create '%v' command: %v", cmd.Name, err)
|
||||
}
|
||||
}
|
||||
|
||||
b.Session.AddHandler(commands.HandleInteraction)
|
||||
|
||||
b.Session.AddHandler(func(s *discordgo.Session, c *discordgo.ChannelDelete) {
|
||||
@@ -357,9 +363,6 @@ func (b *Bot) addBetaCommands(guildID string) bool {
|
||||
}
|
||||
ok := true
|
||||
for _, cmd := range commands.BetaCommands {
|
||||
if cmd.Name == betacmd.Beta.Name && !isBetaServer {
|
||||
continue
|
||||
}
|
||||
keep[cmd.Name] = true
|
||||
if _, err := b.Session.ApplicationCommandCreate(b.AppID, guildID, cmd); err != nil {
|
||||
log.Printf("beta: cannot create '%v' command in %s: %v", cmd.Name, guildID, err)
|
||||
|
||||
Reference in new issue
Block a user