music.queue: fix timestamps try 2, add proper link since masked dont work in field titles
This commit is contained in:
		
							parent
							
								
									a377ee2020
								
							
						
					
					
						commit
						b20344e2a3
					
				
					 1 changed files with 6 additions and 6 deletions
				
			
		| 
						 | 
					@ -608,18 +608,18 @@ command.callback = async function (msg, line) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      const now = Date.now();
 | 
					      const now = Date.now();
 | 
				
			||||||
      let nextTrack =
 | 
					      let nextTrack =
 | 
				
			||||||
        now + (nowPlaying.length / 1000 - (now - nowPlaying.start));
 | 
					        now + (Math.floor(nowPlaying.length / 1000) - (now - nowPlaying.start));
 | 
				
			||||||
      const fields = [];
 | 
					      const fields = [];
 | 
				
			||||||
      for (const index in queue.slice(0, 8)) {
 | 
					      for (const index in queue.slice(0, 8)) {
 | 
				
			||||||
        const item = queue[index];
 | 
					        const item = queue[index];
 | 
				
			||||||
        fields.push({
 | 
					        fields.push({
 | 
				
			||||||
          name: item.title ? `[${item.title}](${item.url})` : item.url,
 | 
					          name: item.title ?? item.url,
 | 
				
			||||||
          value: `${formatTime(item.length)}\nAdded by: <@${
 | 
					          value: `${item.title ? `[Link](${item.url}) - ` : ""}${formatTime(
 | 
				
			||||||
            item.addedBy
 | 
					            item.length
 | 
				
			||||||
          }>\n<t:${nextTrack}:R>`,
 | 
					          )}\nAdded by: <@${item.addedBy}>\n<t:${nextTrack}:R>`,
 | 
				
			||||||
          inline: true,
 | 
					          inline: true,
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
        nextTrack += item.length / 1000;
 | 
					        nextTrack += Math.floor(item.length / 1000);
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      return {
 | 
					      return {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue