first commit

This commit is contained in:
2025-06-21 15:13:58 -05:00
commit 07f75bbd93
37 changed files with 3125 additions and 0 deletions

20
commands/music/stop.js Normal file
View File

@ -0,0 +1,20 @@
const { SlashCommandBuilder } = require("discord.js");
const { resetAll, setStopped } = require("../../playback");
module.exports = {
data: new SlashCommandBuilder()
.setName("stop")
.setDescription("Stop playback and leave the voice channel"),
async execute(interaction) {
const voiceChannel = interaction.member.voice.channel;
if (!voiceChannel) {
return interaction.reply({ content: "You need to be in a voice channel to use this command.", ephemeral: true });
}
setStopped(true); // Mark playback as stopped
resetAll(voiceChannel.guild.id); // Reset everything for a clean state
return interaction.reply("Stopped playback and left the voice channel.");
},
};