File tree 1 file changed +13
-2
lines changed
1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -8,13 +8,18 @@ module.exports = {
8
8
const colour = colours [ row . Label . toLowerCase ( ) ] ?? 'b9b9b9' ;
9
9
const CC = await creatorFriendly ( releaseJSON , row . Track ) ;
10
10
const funcTime = Date . now ( ) - startTime ;
11
- // const artistURL = 'https://google.com';
11
+ let primaryArtist , artistURL = undefined ;
12
+ try {
13
+ primaryArtist = releaseJSON . Release . Artists . find ( a => a . ArtistNumber == 1 ) ;
14
+ artistURL = `https://monstercat.com/artist/${ primaryArtist . URI } ` ;
15
+ } catch ( e ) {
16
+ // maybe log this?
17
+ }
12
18
13
19
const embed = new EmbedBuilder ( )
14
20
. setColor ( colour )
15
21
. setTitle ( `${ row . Track } ` )
16
22
. setURL ( releaseURL ( row . ID ) )
17
- . setAuthor ( { name : `${ row . Artists } ` } ) //, url: `${artistURL}`})
18
23
. setDescription ( `${ licensability [ CC ] } ` )
19
24
. setThumbnail ( coverURL ( row . ID ) )
20
25
. addFields ( {
@@ -47,6 +52,12 @@ module.exports = {
47
52
inline : true
48
53
} )
49
54
. setFooter ( { text : `Retrieved in ${ funcTime } ms.` } ) ;
55
+
56
+ if ( artistURL ) {
57
+ embed . setAuthor ( { name : `${ row . Artists } ` , url : `${ artistURL } ` } )
58
+ } else {
59
+ embed . setAuthor ( { name : `${ row . Artists } ` } ) ;
60
+ }
50
61
51
62
return embed ;
52
63
}
You can’t perform that action at this time.
0 commit comments