mirror of
https://github.com/musix-org/musix-oss
synced 2025-07-03 16:24:28 +00:00
Update 3.3
This commit is contained in:
18
src/commands/previous.js
Normal file
18
src/commands/previous.js
Normal file
@ -0,0 +1,18 @@
|
||||
module.exports = {
|
||||
name: 'previous',
|
||||
alias: 'prev',
|
||||
usage: '',
|
||||
description: 'Play the previous song.',
|
||||
onlyDev: false,
|
||||
permission: 'MANAGE_MESSAGES',
|
||||
category: 'music',
|
||||
async execute(msg, args, client, Discord, 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)
|
||||
}
|
||||
}
|
||||
};
|
16
src/commands/replay.js
Normal file
16
src/commands/replay.js
Normal file
@ -0,0 +1,16 @@
|
||||
module.exports = {
|
||||
name: 'replay',
|
||||
alias: 'none',
|
||||
usage: '',
|
||||
description: 'Replay the currently playing song.',
|
||||
onlyDev: false,
|
||||
permission: 'MANAGE_MESSAGES',
|
||||
category: 'music',
|
||||
async execute(msg, args, client, Discord, command) {
|
||||
const queue = client.queue.get(msg.guild.id);
|
||||
if (client.funcs.check(client, msg, command)) {
|
||||
queue.endReason = "replay";
|
||||
queue.connection.dispatcher.end()
|
||||
}
|
||||
}
|
||||
};
|
@ -20,11 +20,11 @@ module.exports = {
|
||||
return msg.channel.send(client.messages.noSongs);
|
||||
if (point < 0) return msg.channel.send(client.messages.cantSkipToCurrent);
|
||||
for (let i = 0; i < point; i++) {
|
||||
queue.songs.shift();
|
||||
queue.prevSongs.push(queue.songs.shift());
|
||||
}
|
||||
queue.endReason = "skipto";
|
||||
queue.time = 0;
|
||||
queue.connection.dispatcher.end();
|
||||
}
|
||||
},
|
||||
};
|
||||
};
|
Reference in New Issue
Block a user