Skip to content

Commit 3eb0e22

Browse files
committed
Edit Style of Music command !
1 parent 06358f9 commit 3eb0e22

File tree

1 file changed

+23
-12
lines changed

1 file changed

+23
-12
lines changed

Commands/Music/Play.ts

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,24 @@ export class play extends Command {
2525
);
2626
const permissions = voiceChannel.permissionsFor(message.client.user);
2727
if (!permissions.has("CONNECT") || !permissions.has("SPEAK")) {
28-
return message.channel.send(
29-
"I need the permissions to join and speak in your voice channel!"
30-
);
28+
const Embed = new Discord.MessageEmbed()
29+
.setColor('#0099ff')
30+
.setTitle('I need Persmission')
31+
.setDescription(`I need the permissions to join and speak in your voice channel!`)
32+
.setThumbnail('https://image.noelshack.com/fichiers/2020/34/7/1598188353-icons8-jason-voorhees-500.png')
33+
.setTimestamp()
34+
return message.channel.send(Embed);
3135
}
3236

3337
const songInfo = await search(args, opts);
3438

3539
const song = {
3640
title: songInfo.results[0].title,
3741
url: songInfo.results[0].link,
38-
user: message.author.username
42+
user: {
43+
username: message.author.username,
44+
id: message.author.id
45+
}
3946
};
4047

4148
if (!serverQueue) {
@@ -63,7 +70,11 @@ export class play extends Command {
6370
}
6471
} else {
6572
serverQueue.songs.push(song);
66-
return message.channel.send(`${song.title} has been added to the queue!`);
73+
const Embed = new Discord.MessageEmbed()
74+
.setColor('#0099ff')
75+
.setDescription(`Queued [${song.title}](${song.url}) [<@${song.user.id}>]`)
76+
.setTimestamp()
77+
return message.channel.send(Embed);
6778
}
6879

6980
}
@@ -74,11 +85,11 @@ export class play extends Command {
7485
if (!song) {
7586

7687
const Embed = new Discord.MessageEmbed()
77-
.setColor('#0099ff')
78-
.setTitle(`No Song to play, I will leave the channel`)
79-
.setAuthor(``, 'https://image.noelshack.com/fichiers/2020/34/7/1598188353-icons8-jason-voorhees-500.png')
80-
.setThumbnail('https://image.noelshack.com/fichiers/2020/34/7/1598188353-icons8-jason-voorhees-500.png')
81-
.setTimestamp()
88+
.setColor('#0099ff')
89+
.setTitle('No song')
90+
.setDescription(`I will be Disconnected`)
91+
.setThumbnail('https://image.noelshack.com/fichiers/2020/34/7/1598188353-icons8-jason-voorhees-500.png')
92+
.setTimestamp()
8293
serverQueue.textChannel.send(Embed).then((msg) => {
8394
msg.delete({ timeout: 5000 });
8495
serverQueue.voiceChannel.leave();
@@ -98,8 +109,8 @@ export class play extends Command {
98109

99110
const Embed = new Discord.MessageEmbed()
100111
.setColor('#0099ff')
101-
.setTitle(`New Song : **${song.title}** played by ${song.user}`)
102-
.setAuthor(``, 'https://image.noelshack.com/fichiers/2020/34/7/1598188353-icons8-jason-voorhees-500.png')
112+
.setTitle('Now playing')
113+
.setDescription(`[${song.title}](${song.url}) [<@${song.user.id}>]`)
103114
.setThumbnail('https://image.noelshack.com/fichiers/2020/34/7/1598188353-icons8-jason-voorhees-500.png')
104115
.setTimestamp()
105116
serverQueue.textChannel.send(Embed);

0 commit comments

Comments
 (0)