1
0
mirror of https://github.com/musix-org/musix-oss synced 2025-07-07 17:00:48 +00:00
Files
musix-oss/src/commands/previous.js
2024-02-10 09:33:59 +02:00

18 lines
630 B
JavaScript

module.exports = {
name: 'previous',
alias: ["prev", "return", "back"],
usage: '',
description: 'Play the previous song.',
permission: 'MANAGE_MESSAGES',
category: 'music control',
async execute(msg, args, client, command) {
const queue = client.queue.get(msg.guild.id)
if (client.funcs.check(client, msg, command)) {
if (queue.prevSongs.length < 1) return msg.channel.send(client.messages.noPreviousSongs);
queue.endReason = "previous";
queue.connection.dispatcher.end()
msg.channel.send(client.messages.previousSong)
}
}
};