switch many command playing to playm
This commit is contained in:
parent
baf591ffc8
commit
1c59ccb513
|
@ -216,6 +216,7 @@ async function playOrQueue(qsong, channel, msg) {
|
||||||
channel.send(`queueing <${qsong}>...`);
|
channel.send(`queueing <${qsong}>...`);
|
||||||
|
|
||||||
let [q, e] = await queueUp(qsong, msg.guild.id);
|
let [q, e] = await queueUp(qsong, msg.guild.id);
|
||||||
|
if (!q && e) [q, e] = await queueUp('ytsearch:' + qsong, msg.guild.id);
|
||||||
if (!q && e) return msg.channel.send(e);
|
if (!q && e) return msg.channel.send(e);
|
||||||
const song = queue[msg.guild.id][queue[msg.guild.id].length - 1];
|
const song = queue[msg.guild.id][queue[msg.guild.id].length - 1];
|
||||||
|
|
||||||
|
@ -251,12 +252,12 @@ bot.on('messageCreate', async (msg) => {
|
||||||
|
|
||||||
if (!msg.guild || !content.startsWith(prefix) || !msg.channel) return;
|
if (!msg.guild || !content.startsWith(prefix) || !msg.channel) return;
|
||||||
|
|
||||||
if ((cmd === 'play' || cmd === 'p') && params[1]) {
|
if ((cmd === 'playm' || cmd === 'playmany' || cmd === 'pm') && params[1]) {
|
||||||
for (const p of params.slice(1)) {
|
for (const p of params.slice(1)) {
|
||||||
await playOrQueue(p, msg.channel, msg);
|
await playOrQueue(p, msg.channel, msg);
|
||||||
}
|
}
|
||||||
} else if (cmd === 'search') {
|
} else if (cmd === 'play' || cmd === 'p') {
|
||||||
playOrQueue(p.slice(1), msg.channel, msg);
|
playOrQueue(params.slice(1).join(' '), msg.channel, msg);
|
||||||
} else if (cmd === 'skip' || cmd === 's') {
|
} else if (cmd === 'skip' || cmd === 's') {
|
||||||
const player = players[msg.guild.id];
|
const player = players[msg.guild.id];
|
||||||
if (!player) return msg.channel.send('the bot isn\'t playing any music!');
|
if (!player) return msg.channel.send('the bot isn\'t playing any music!');
|
||||||
|
|
Reference in New Issue