This repository has been archived on 2026-03-28. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
legacy-musicbot/commands/music/clear.js
2021-09-23 22:22:33 +02:00

18 lines
604 B
JavaScript

module.exports = {
name: 'clear',
aliases: ['cq'],
utilisation: '{prefix}clear',
voiceChannel: true,
async execute(client, message) {
const queue = player.getQueue(message.guild.id);
if (!queue || !queue.playing) return message.channel.send(`No music currently playing ${message.author}... try again ? ❌`);
if (!queue.tracks[0]) return message.channel.send(`No music in the queue after the current one ${message.author}... try again ? ❌`);
await queue.clear();
message.channel.send(`The queue has just been cleared 🗑️`);
},
};