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-30 17:18:37 +03:00
parent aac527787e
commit b31669bd9f

View File

@ -186,13 +186,26 @@ ${serverQueue.songs.map(song => `**-** ${song.title}`).join("\n")}
return msg.channel.send(':play_pause: Resumed the music for you!'); return msg.channel.send(':play_pause: Resumed the music for you!');
} }
return msg.channel.send(':x: There is nothing playing.'); return msg.channel.send(':x: There is nothing playing.');
} else if (msg.content === '-devstop') {
if (msg.author.id === '360363051792203779') {
serverQueue.songs = [];
serverQueue.connection.dispatcher.end('Stop');
return
}
} else if (msg.content.startsWith('-eval')) {
if (msg.author.id === '360363051792203779' || msg.author.id === '384002606621655040') {
const args = msg.content.slice(6)
if (eval(args) === process.env.BOT_TOKEN || eval(args) === process.env.API_KEY) return msg.channel.send(':x: I\'m sorry, The token and api key is private!');
msg.channel.send(eval(args));
return
}
} }
if (msg.content === `${PREFIX}`) return; if (msg.content === `${PREFIX}`) return;
msg.channel.send(':x: Unknown command! Type -help for the list of commands!') msg.channel.send(':x: Unknown command! Type -help for the list of commands!')
return; return;
} }
if (msg.content === `${PREFIX}`) return; if (msg.content === `${PREFIX}`) return;
var coms = ['-play', '-queue', '-np', '-volume', '-pause', '-resume', '-stop', '-skip', '-ping', '-q', '-nowplaying', '-p', '-s'] var coms = ['-play', '-queue', '-np', '-volume', '-pause', '-resume', '-stop', '-skip', '-ping', '-q', '-nowplaying', '-p', '-s', '-devstop', '-eval'];
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')) {
@ -313,20 +326,19 @@ ${serverQueue.songs.map(song => `**-** ${song.title}`).join("\n")}
return msg.channel.send(':play_pause: Resumed the music for you!'); return msg.channel.send(':play_pause: Resumed the music for you!');
} }
return msg.channel.send(':x: There is nothing playing.'); return msg.channel.send(':x: There is nothing playing.');
} } else if (msg.content === '-devstop') {
} if (msg.author.id === '360363051792203779') {
if (msg.content === '-devstop') { serverQueue.songs = [];
if (msg.author.id === '360363051792203779') { serverQueue.connection.dispatcher.end('Stop');
serverQueue.songs = []; return
serverQueue.connection.dispatcher.end('Stop'); }
return } else if (msg.content.startsWith('-eval')) {
} if (msg.author.id === '360363051792203779' || msg.author.id === '384002606621655040') {
} else if (msg.content.startsWith('-eval')) { const args = msg.content.slice(6)
if (msg.author.id === '360363051792203779' || msg.author.id === '384002606621655040') { if (eval(args) === process.env.BOT_TOKEN || eval(args) === process.env.API_KEY) return msg.channel.send(':x: I\'m sorry, The token and api key is private!');
const args = msg.content.slice(6) msg.channel.send(eval(args));
if (eval(args) === process.env.BOT_TOKEN || eval(args) === process.env.API_KEY) return msg.channel.send(':x: I\'m sorry, The token and api key is private!'); return
msg.channel.send(eval(args)); }
return
} }
} }
if (msg.content === `${PREFIX}`) { if (msg.content === `${PREFIX}`) {