mirror of
https://github.com/hazemKrimi/discord-bot.git
synced 2026-05-01 18:30:25 +00:00
added small changes
This commit is contained in:
@@ -33,7 +33,7 @@ module.exports = class Play extends Command {
|
||||
else {
|
||||
message.guild.music.paused = true;
|
||||
message.guild.music.dispatcher.pause(true);
|
||||
const embed = new MessageEmbed().setColor('#000099').setTitle(':pause_button: paused player');
|
||||
const embed = new MessageEmbed().setColor('#000099').setTitle(':pause_button: Paused player');
|
||||
return await message.say({ embed });
|
||||
}
|
||||
} catch (err) {
|
||||
|
||||
@@ -71,7 +71,7 @@ module.exports = class Play extends Command {
|
||||
}
|
||||
});
|
||||
if (message.guild.music.isPlaying) {
|
||||
const embed = new MessageEmbed().setColor('#000099').setTitle(`:arrow_forward: "${playlist.title}" (${playlistVideos.length} tracks) added to queue`);
|
||||
const embed = new MessageEmbed().setColor('#000099').setTitle(`:arrow_forward: Added "${playlist.title}" to queue (${playlistVideos.length} tracks)`);
|
||||
return await message.say({ embed });
|
||||
}
|
||||
} else if (query.match(/^(http(s)?:\/\/)?((w){3}.)?youtu(be|.be)?(\.com)?\/\S+/)) {
|
||||
@@ -100,7 +100,7 @@ module.exports = class Play extends Command {
|
||||
message.guild.music.isPlaying = true;
|
||||
return message.guild.play(message.guild.music.queue, message);
|
||||
} else {
|
||||
const embed = new MessageEmbed().setColor('#000099').setTitle(`:arrow_forward: "${data.title}" added to queue`);
|
||||
const embed = new MessageEmbed().setColor('#000099').setTitle(`:arrow_forward: Added "${data.title}" to queue`);
|
||||
return await message.say({ embed });
|
||||
}
|
||||
} else if (query.match(/^(http(s)?:\/\/)?((w){3}.)?facebook?(\.com)?\/\S+\/videos\/\S+/)) {
|
||||
@@ -149,7 +149,7 @@ module.exports = class Play extends Command {
|
||||
message.guild.music.isPlaying = true;
|
||||
return message.guild.play(message.guild.music.queue, message);
|
||||
} else {
|
||||
const embed = new MessageEmbed().setColor('#000099').setTitle(`:arrow_forward: "${data.title}" added to queue`);
|
||||
const embed = new MessageEmbed().setColor('#000099').setTitle(`:arrow_forward: Added "${data.title}" to queue`);
|
||||
return await message.say({ embed });
|
||||
}
|
||||
} else if (query.match(/^(http(s)?:\/\/)?((w){3}\S)?\S+(\.)\S+\/\S+\.(\S){3}/)) {
|
||||
@@ -184,7 +184,7 @@ module.exports = class Play extends Command {
|
||||
message.guild.music.isPlaying = true;
|
||||
return message.guild.play(message.guild.music.queue, message);
|
||||
} else {
|
||||
const embed = new MessageEmbed().setColor('#000099').setTitle(`:arrow_forward: "${data.title}" added to queue`);
|
||||
const embed = new MessageEmbed().setColor('#000099').setTitle(`:arrow_forward: Added "${data.title}" to queue`);
|
||||
return await message.say({ embed });
|
||||
}
|
||||
}
|
||||
@@ -218,7 +218,7 @@ module.exports = class Play extends Command {
|
||||
message.guild.music.isPlaying = true;
|
||||
return message.guild.play(message.guild.music.queue, message);
|
||||
} else {
|
||||
const embed = new MessageEmbed().setColor('#000099').setTitle(`:arrow_forward: "${data.title}" added to queue`);
|
||||
const embed = new MessageEmbed().setColor('#000099').setTitle(`:arrow_forward: Added "${data.title}" to queue`);
|
||||
return await message.say({ embed });
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,16 +24,14 @@ module.exports = class Play extends Command {
|
||||
} else {
|
||||
const embed = new MessageEmbed().setColor('#000099').setTitle(':musical_note: Queue');
|
||||
|
||||
embed.addField('Now playing', message.guild.music.nowPlaying.title).addField('Duration', `${message.guild.music.nowPlaying.playingFor.string}/${message.guild.music.nowPlaying.duration.string}`);
|
||||
embed
|
||||
.addField('Now playing', `${message.guild.music.nowPlaying.title} ${message.guild.music.nowPlaying.by && `By ${message.guild.music.nowPlaying.by}`}`)
|
||||
.addField('Duration', `${message.guild.music.nowPlaying.playingFor.string}/${message.guild.music.nowPlaying.duration.string}`);
|
||||
|
||||
if (message.guild.music.queue.length === 0) embed.addField('Queue', 'nothing in the queue');
|
||||
else embed.addField('Queue', `${message.guild.music.queue.length} track(s)`);
|
||||
|
||||
message.guild.music.queue.forEach((item, index) => {
|
||||
let itemString = `${item.title}`;
|
||||
if (item.type === 'youtube' || item.type === 'search' || item.type === 'facebook') itemString += ` By ${item.by}`;
|
||||
embed.addField(index + 1, itemString);
|
||||
});
|
||||
message.guild.music.queue.forEach((item, index) => embed.addField(index + 1, `${item.title} ${item.by && `By ${item.by}`}`));
|
||||
|
||||
return await message.say({ embed });
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ module.exports = class Play extends Command {
|
||||
else {
|
||||
message.guild.music.paused = false;
|
||||
message.guild.music.dispatcher.resume();
|
||||
const embed = new MessageEmbed().setColor('#000099').setTitle(':arrow_forward: resumed player');
|
||||
const embed = new MessageEmbed().setColor('#000099').setTitle(':arrow_forward: Resumed player');
|
||||
return await message.say({ embed });
|
||||
}
|
||||
} catch (err) {
|
||||
|
||||
Reference in New Issue
Block a user