mirror of
https://github.com/ChomeNS/chomens-bot-mc.git
synced 2024-11-23 15:47:57 -05:00
add skip to discord + "Skipping" and not "Skipped"
This commit is contained in:
parent
033e2610f0
commit
34d3223113
1 changed files with 14 additions and 2 deletions
|
@ -150,7 +150,7 @@ module.exports = {
|
||||||
}
|
}
|
||||||
if (args[0]==='skip') {
|
if (args[0]==='skip') {
|
||||||
try {
|
try {
|
||||||
bot.core.run('minecraft:tellraw @a ' + JSON.stringify([{text: 'Skipped '}, {text: bot.music.song.name, color: 'gold'}]));
|
bot.core.run('minecraft:tellraw @a ' + JSON.stringify([{text: 'Skipping '}, {text: bot.music.song.name, color: 'gold'}]));
|
||||||
bot.music.skip();
|
bot.music.skip();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
throw new Error('No music is currently playing!');
|
throw new Error('No music is currently playing!');
|
||||||
|
@ -196,13 +196,25 @@ module.exports = {
|
||||||
}
|
}
|
||||||
bot.music.stop();
|
bot.music.stop();
|
||||||
}
|
}
|
||||||
|
if (args[0]==='skip') {
|
||||||
|
try {
|
||||||
|
const Embed = new MessageEmbed()
|
||||||
|
.setColor('#FFFF00')
|
||||||
|
.setTitle('Loop')
|
||||||
|
.setDescription(`Skipping ${bot.music.song.name}`);
|
||||||
|
channeldc.send({embeds: [Embed]});
|
||||||
|
bot.music.skip();
|
||||||
|
} catch (e) {
|
||||||
|
throw new Error('No music is currently playing!');
|
||||||
|
}
|
||||||
|
}
|
||||||
if (args[0]==='loop') {
|
if (args[0]==='loop') {
|
||||||
if (args[1] === 'off') {
|
if (args[1] === 'off') {
|
||||||
bot.music.loop = 0;
|
bot.music.loop = 0;
|
||||||
const Embed = new MessageEmbed()
|
const Embed = new MessageEmbed()
|
||||||
.setColor('#FFFF00')
|
.setColor('#FFFF00')
|
||||||
.setTitle('Loop')
|
.setTitle('Loop')
|
||||||
.setDescription(`Looping is now disabled`);
|
.setDescription('Looping is now disabled');
|
||||||
channeldc.send({embeds: [Embed]});
|
channeldc.send({embeds: [Embed]});
|
||||||
}
|
}
|
||||||
if (args[1] === 'current') {
|
if (args[1] === 'current') {
|
||||||
|
|
Loading…
Reference in a new issue