File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,8 @@ export default class Discord {
4545
4646 setDiscordRPC ( ) {
4747 if ( this . discord . user ) {
48+ const mediaUrl = this . allowDiscordDetails ? 'https://anilist.co/anime/' + this . mediaId : 'https://hayase.watch'
49+ const mediaTitle = this . allowDiscordDetails ? this . session ?. title ?? 'Anime' : 'Anime'
4850 const position = ( this . position ?. position ?? 0 ) * 1000
4951 const duration = ( this . position ?. duration ?? 0 ) * 1000
5052 const status = {
@@ -53,14 +55,19 @@ export default class Discord {
5355 type : 3 ,
5456 name : 'Hayase' ,
5557 state : this . allowDiscordDetails ? this . session ?. description ?? 'Streaming anime torrents! 🍿' : 'Streaming anime torrents! 🍿' ,
56- details : this . allowDiscordDetails ? this . session ?. title ?? 'Looking around...' : 'Looking around...' ,
58+ details : mediaTitle ,
59+ details_url : mediaUrl ,
5760 timestamps : {
5861 start : this . allowDiscordDetails && this . position ? Date . now ( ) - position : undefined ,
5962 end : this . allowDiscordDetails && this . position && this . playback === 'playing' ? Date . now ( ) + ( duration - position ) : undefined
6063 } ,
6164 assets : {
6265 large_image : this . allowDiscordDetails && this . session ?. image ? this . session . image : 'logo' ,
63- large_text : 'https://hayase.watch'
66+ large_text : mediaTitle ,
67+ large_url : mediaUrl ,
68+ small_image : 'logo' ,
69+ small_text : 'Watching on Hayase' ,
70+ small_url : 'https://hayase.watch'
6471 } ,
6572 buttons : [
6673 {
@@ -75,7 +82,8 @@ export default class Discord {
7582 party : {
7683 id : '1222'
7784 } ,
78- instance : true
85+ instance : true ,
86+ status_display_type : 2 // details
7987 }
8088 }
8189 this . discord . request ( 'SET_ACTIVITY' , status )
You can’t perform that action at this time.
0 commit comments