@@ -25,17 +25,24 @@ export class play extends Command {
25
25
) ;
26
26
const permissions = voiceChannel . permissionsFor ( message . client . user ) ;
27
27
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 ) ;
31
35
}
32
36
33
37
const songInfo = await search ( args , opts ) ;
34
38
35
39
const song = {
36
40
title : songInfo . results [ 0 ] . title ,
37
41
url : songInfo . results [ 0 ] . link ,
38
- user : message . author . username
42
+ user : {
43
+ username : message . author . username ,
44
+ id : message . author . id
45
+ }
39
46
} ;
40
47
41
48
if ( ! serverQueue ) {
@@ -63,7 +70,11 @@ export class play extends Command {
63
70
}
64
71
} else {
65
72
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 ) ;
67
78
}
68
79
69
80
}
@@ -74,11 +85,11 @@ export class play extends Command {
74
85
if ( ! song ) {
75
86
76
87
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 ( )
82
93
serverQueue . textChannel . send ( Embed ) . then ( ( msg ) => {
83
94
msg . delete ( { timeout : 5000 } ) ;
84
95
serverQueue . voiceChannel . leave ( ) ;
@@ -98,8 +109,8 @@ export class play extends Command {
98
109
99
110
const Embed = new Discord . MessageEmbed ( )
100
111
. 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 } >]` )
103
114
. setThumbnail ( 'https://image.noelshack.com/fichiers/2020/34/7/1598188353-icons8-jason-voorhees-500.png' )
104
115
. setTimestamp ( )
105
116
serverQueue . textChannel . send ( Embed ) ;
0 commit comments