Lanbot_Music/commands/music/save.js

18 lines
761 B
JavaScript
Raw Normal View History

2022-04-03 04:34:37 +02:00
module.exports = {
name: 'save',
aliases: ['sv'],
utilisation: '{prefix}save',
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 ? ❌`);
message.author.send(`You saved the track ${queue.current.title} | ${queue.current.author} from the server ${message.guild.name}`).then(() => {
message.channel.send(`I have sent you the title of the music by private messages ✅`);
}).catch(error => {
message.channel.send(`Unable to send you a private message ${message.author}... try again ? ❌`);
});
},
};