music: please work for queue removal...
This commit is contained in:
		
							parent
							
								
									bf5a6df175
								
							
						
					
					
						commit
						5cc4a03b08
					
				
					 1 changed files with 3 additions and 5 deletions
				
			
		| 
						 | 
					@ -700,11 +700,9 @@ command.callback = async function (msg, line) {
 | 
				
			||||||
        );
 | 
					        );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (Array.isArray(toRemove)) {
 | 
					        if (Array.isArray(toRemove)) {
 | 
				
			||||||
          for (const removedItem of toRemove) {
 | 
					 | 
				
			||||||
          connection._music_queue = connection._music_queue.filter(
 | 
					          connection._music_queue = connection._music_queue.filter(
 | 
				
			||||||
              (item) => item.id !== removedItem
 | 
					            (item) => !toRemove.includes(item.id)
 | 
				
			||||||
          );
 | 
					          );
 | 
				
			||||||
          }
 | 
					 | 
				
			||||||
          return `Removed ${toRemove.length} item(s).`;
 | 
					          return `Removed ${toRemove.length} item(s).`;
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
          return toRemove;
 | 
					          return toRemove;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue