1
0
mirror of https://github.com/musix-org/musix-oss synced 2024-12-22 21:13:18 +00:00

Update index.js

This commit is contained in:
MatteZ02 2019-07-23 09:30:56 +03:00
parent f7d19118e9
commit cb10d308a0

View File

@ -34,7 +34,6 @@ client.on('message', async msg => {
.addField('```-skip```', 'Skip a song.', true) .addField('```-skip```', 'Skip a song.', true)
.addField('```-invite```', 'Invite Musix.', true) .addField('```-invite```', 'Invite Musix.', true)
.addField('```-ping```', 'See the current ping for Musix', true) .addField('```-ping```', 'See the current ping for Musix', true)
.addField('```-uptime```', 'See the current uptime for Musix', true)
.addField('```-info```', 'Display info and instructions.', true) .addField('```-info```', 'Display info and instructions.', true)
.addField('```-help```', 'Display the help.', true) .addField('```-help```', 'Display the help.', true)
.setAuthor('Musix', 'https://cdn.discordapp.com/avatars/572405135658188800/04c6f22b7600ddecfbc245dd3ec10f9f.png?size=2048') .setAuthor('Musix', 'https://cdn.discordapp.com/avatars/572405135658188800/04c6f22b7600ddecfbc245dd3ec10f9f.png?size=2048')
@ -121,6 +120,7 @@ Please provide a value to select one of the search results ranging from __1-10__
} else if (command === 'skip') { } else if (command === 'skip') {
if (!msg.member.voiceChannel) return msg.channel.send(':x: You are not in a voice channel!'); if (!msg.member.voiceChannel) return msg.channel.send(':x: You are not in a voice channel!');
if (!serverQueue) return msg.channel.send(':x: There is nothing playing that I could skip for you.'); if (!serverQueue) return msg.channel.send(':x: There is nothing playing that I could skip for you.');
if (!serverQueue.songs[1]) return msg.channel.send(':x: Theres nothing to skip to!')
serverQueue.connection.dispatcher.end('Skipped'); serverQueue.connection.dispatcher.end('Skipped');
return undefined; return undefined;
} else if (command === 'stop') { } else if (command === 'stop') {
@ -172,7 +172,7 @@ ${serverQueue.songs.map(song => `**-** ${song.title}`).join("\n")}
return undefined; return undefined;
} }
if (msg.content === `${PREFIX}`) return; if (msg.content === `${PREFIX}`) return;
var coms = ['-play', '-queue', '-np', '-volume', '-pause', '-resume', '-stop', '-skip', '-uptime', '-ping'] var coms = ['-play', '-queue', '-np', '-volume', '-pause', '-resume', '-stop', '-skip', '-ping']
for (var i = 0; i < coms.length; i++) { for (var i = 0; i < coms.length; i++) {
if (msg.content.includes(coms[i])) { if (msg.content.includes(coms[i])) {
if (!msg.member.roles.find(x => x.name === 'DJ')) { if (!msg.member.roles.find(x => x.name === 'DJ')) {