add skip to discord + "Skipping" and not "Skipped"

This commit is contained in:
ChomeNS 2022-11-01 18:02:24 +07:00
parent 033e2610f0
commit 34d3223113

View file

@ -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') {