From 52dfe859ee6e3b7b78c53609703e8263860d00ef Mon Sep 17 00:00:00 2001 From: FernandoJVideira <03.pleaser-minster@icloud.com> Date: Sat, 29 Aug 2026 19:48:43 +0100 Subject: [PATCH] feat(music): add a stop command Clears the whole queue and disconnects, mirrors the existing Stop Manager function, just wires it up to the outbox like every other dashboard command. --- internal/music/listener.go | 3 +++ schema.sql | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/music/listener.go b/internal/music/listener.go index bf8cc20..4b9757a 100644 --- a/internal/music/listener.go +++ b/internal/music/listener.go @@ -64,6 +64,9 @@ func dispatchCommand(cmd musicrepo.MusicCommand) error { case "resume": return Pause(guildID, false) + case "stop": + return Stop(guildID) + case "set_volume": var payload struct { Volume int `json:"volume"` diff --git a/schema.sql b/schema.sql index a8cf7c0..d752ea7 100644 --- a/schema.sql +++ b/schema.sql @@ -170,7 +170,7 @@ CREATE TABLE IF NOT EXISTS music_queue ( CREATE TABLE IF NOT EXISTS music_commands ( id BIGSERIAL PRIMARY KEY, guild_id BIGINT NOT NULL, - command_type TEXT NOT NULL CHECK (command_type IN ('skip', 'pause', 'resume', 'set_volume', 'remove_track', 'reorder', 'repeat_song', 'repeat_queue', 'add_song')), + command_type TEXT NOT NULL CHECK (command_type IN ('skip', 'pause', 'resume', 'set_volume', 'remove_track', 'reorder', 'repeat_song', 'repeat_queue', 'add_song', 'stop')), payload JSONB, requested_by BIGINT NOT NULL, created_at TIMESTAMPTZ DEFAULT NOW(),