Initial Code

This commit is contained in:
2025-11-23 13:22:13 -05:00
parent b16d4adfd2
commit c3e52d6a03
96 changed files with 7088 additions and 135 deletions

View File

@@ -0,0 +1,28 @@
import BotCommand from "../../libs/BotCommand";
import BotClient from "../../libs/BotClient";
import { ChatInputCommandInteraction, GuildMember } from "discord.js";
export default class StopCommand extends BotCommand {
constructor() {
super("stop", "Stop Command", "/stop");
}
override async execute(Discord: any, client: BotClient, interaction: ChatInputCommandInteraction): Promise<any> {
const member = interaction.member as GuildMember;
if(!member?.voice?.channel) {
return await interaction.reply({ content: "❌ | You need to be in a voice channel!" });
}
const queue = client.distube.getQueue(interaction);
if(!queue) return await interaction.reply({ content: `❌ | There is no music playing!` });
client.distube.stop(interaction);
const embed = new Discord.EmbedBuilder()
.setDescription(` Successfully **Stopped** the music.`)
.setFooter({ text: `Request by ${interaction.user.tag}`, iconURL: interaction.user.displayAvatarURL() });
return await interaction.reply({ embeds: [embed] });
}
}