Files
dj-spangebob/src/commands/stop.ts
Patryk Koreń ad87d3fbb8 Add an overlay soundboard and fix playback command bugs.
Stop was advancing the queue, history overwrote the day file, and slash commands often never replied; soundboard clips now mix on top of the current track.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 17:03:02 +02:00

29 lines
680 B
TypeScript

import { CacheType, ChatInputCommandInteraction, SlashCommandBuilder } from 'discord.js';
import { stop_playback } from '../playback';
import { player } from '../main';
const name = "stop"
function register() {
return new SlashCommandBuilder()
.setName(name)
.setDescription('stop playback')
}
async function execute(interaction: ChatInputCommandInteraction<CacheType>) {
try {
stop_playback(player)
await interaction.reply('Zatrzymane, kolejka wyczyszczona')
} catch (error) {
console.error(error);
await interaction.reply('Coś poszło nie tak :/');
}
}
export default {
name,
register,
execute
}