1
0
mirror of https://github.com/musix-org/musix-oss synced 2024-12-23 00:23:17 +00:00

Update index.js

This commit is contained in:
MatteZ02 2019-07-30 08:01:29 +03:00
parent 0e39d7f210
commit 13b1a320ff

View File

@ -42,14 +42,14 @@ client.on('message', async msg => {
if (msg.content === `${PREFIX}help`) { if (msg.content === `${PREFIX}help`) {
const embed = new Discord.RichEmbed() const embed = new Discord.RichEmbed()
.setTitle('Commands for Musix!') .setTitle('Commands for Musix!')
.addField('```-play```', 'Play a song.', true) .addField('```-play | -p```', 'Play a song.', true)
.addField('```-queue```', 'Display the queue.', true) .addField('```-queue | -q```', 'Display the queue.', true)
.addField('```-np```', 'Display whats currently playing.', true) .addField('```-nowplaying | -np```', 'Display whats currently playing.', true)
.addField('```-volume```', 'Change or check the volume.', true) .addField('```-volume```', 'Change or check the volume.', true)
.addField('```-pause```', 'Pause the music.', true) .addField('```-pause```', 'Pause the music.', true)
.addField('```-resume```', 'Resume the music.', true) .addField('```-resume```', 'Resume the music.', true)
.addField('```-stop```', 'Stop the music, Clear the queue and leave the current voice channel.', true) .addField('```-stop```', 'Stop the music, Clear the queue and leave the current voice channel.', true)
.addField('```-skip```', 'Skip a song.', true) .addField('```-skip | -s```', '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('```-info```', 'Display info and instructions.', true) .addField('```-info```', 'Display info and instructions.', true)
@ -157,10 +157,10 @@ Please provide a value to select one of the search results ranging from __1-10__
serverQueue.volume = args[1]; serverQueue.volume = args[1];
serverQueue.connection.dispatcher.setVolumeLogarithmic(args[1] / 5); serverQueue.connection.dispatcher.setVolumeLogarithmic(args[1] / 5);
return msg.channel.send(`I set the volume to: **${args[1]}** 🔊`); return msg.channel.send(`I set the volume to: **${args[1]}** 🔊`);
} else if (command === 'np') { } else if (command === 'np' || command === 'nowplaying') {
if (!serverQueue) return msg.channel.send(':x: There is nothing playing.'); if (!serverQueue) return msg.channel.send(':x: There is nothing playing.');
return msg.channel.send(`:musical_note: Now playing: **${serverQueue.songs[0].title}**`); return msg.channel.send(`:musical_note: Now playing: **${serverQueue.songs[0].title}**`);
} else if (command === "queue") { } else if (command === "queue" || command === 'q') {
if (!serverQueue) if (!serverQueue)
return msg.channel.send(":x: There is nothing in the queue."); return msg.channel.send(":x: There is nothing in the queue.");
var queuemessage = `__**Song queue:**__ var queuemessage = `__**Song queue:**__
@ -190,7 +190,7 @@ ${serverQueue.songs.map(song => `**-** ${song.title}`).join("\n")}
return; return;
} }
if (msg.content === `${PREFIX}`) return; if (msg.content === `${PREFIX}`) return;
var coms = ['-play', '-queue', '-np', '-volume', '-pause', '-resume', '-stop', '-skip', '-ping'] var coms = ['-play', '-queue', '-np', '-volume', '-pause', '-resume', '-stop', '-skip', '-ping', '-q', '-nowplaying', '-p', '-s']
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')) {
@ -284,10 +284,10 @@ Please provide a value to select one of the search results ranging from 1-10.
serverQueue.volume = args[1]; serverQueue.volume = args[1];
serverQueue.connection.dispatcher.setVolumeLogarithmic(args[1] / 5); serverQueue.connection.dispatcher.setVolumeLogarithmic(args[1] / 5);
return msg.channel.send(`I set the volume to: **${args[1]}** 🔊`); return msg.channel.send(`I set the volume to: **${args[1]}** 🔊`);
} else if (command === 'np') { } else if (command === 'np' || command === 'nowplaying') {
if (!serverQueue) return msg.channel.send(':x: There is nothing playing.'); if (!serverQueue) return msg.channel.send(':x: There is nothing playing.');
return msg.channel.send(`:musical_note: Now playing: **${serverQueue.songs[0].title}**`); return msg.channel.send(`:musical_note: Now playing: **${serverQueue.songs[0].title}**`);
} else if (command === "queue") { } else if (command === "queue" || command === 'q') {
if (!serverQueue) if (!serverQueue)
return msg.channel.send(":x: There is nothing in the queue."); return msg.channel.send(":x: There is nothing in the queue.");
var queuemessage = `__**Song queue:**__ var queuemessage = `__**Song queue:**__