music.queue: add total length
This commit is contained in:
		
							parent
							
								
									10f1a178bc
								
							
						
					
					
						commit
						3897182797
					
				
					 1 changed files with 8 additions and 1 deletions
				
			
		| 
						 | 
					@ -652,13 +652,20 @@ command.callback = async function (msg, line) {
 | 
				
			||||||
        nextTrack += item.length;
 | 
					        nextTrack += item.length;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      let totalLength = 0;
 | 
				
			||||||
 | 
					      for (const item of queue) {
 | 
				
			||||||
 | 
					        totalLength += item.length;
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      return {
 | 
					      return {
 | 
				
			||||||
        embed: {
 | 
					        embed: {
 | 
				
			||||||
          title: ":inbox_tray: Currently Queued",
 | 
					          title: ":inbox_tray: Currently Queued",
 | 
				
			||||||
          color: 0x0088cc,
 | 
					          color: 0x0088cc,
 | 
				
			||||||
          fields,
 | 
					          fields,
 | 
				
			||||||
          footer: {
 | 
					          footer: {
 | 
				
			||||||
            text: queue.length > 9 ? `Showing 9/${queue.length} items` : "",
 | 
					            text:
 | 
				
			||||||
 | 
					              (queue.length > 9 ? `Showing 9/${queue.length} items | ` : "") +
 | 
				
			||||||
 | 
					              `Total length: ${formatTime(totalLength)}`,
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue