music: forgot [0] on splice
This commit is contained in:
		
							parent
							
								
									f212046bfb
								
							
						
					
					
						commit
						13b6420ff6
					
				
					 1 changed files with 1 additions and 7 deletions
				
			
		| 
						 | 
					@ -118,13 +118,7 @@ async function createVoiceConnection(guild_id, voice_id, text_id) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  connection._music_eventEnd = async function () {
 | 
					  connection._music_eventEnd = async function () {
 | 
				
			||||||
    if (connection._music_queue.length > 0) {
 | 
					    if (connection._music_queue.length > 0) {
 | 
				
			||||||
      const next = connection._music_queue.splice(0, 1);
 | 
					      const next = connection._music_queue.splice(0, 1)[0];
 | 
				
			||||||
      hf.bot.guilds
 | 
					 | 
				
			||||||
        .get(guild_id)
 | 
					 | 
				
			||||||
        .channels.get(text_id)
 | 
					 | 
				
			||||||
        .createMessage(
 | 
					 | 
				
			||||||
          `DEBUG: \`\`\`\nnext = ${next}\nnext.url = ${next.url}\nnext.type = ${next.type}\nnext.addedBy = ${next.addedBy}\n\nqueue length: ${connection._music_queue.length}\n\`\`\``
 | 
					 | 
				
			||||||
        );
 | 
					 | 
				
			||||||
      await enqueue(
 | 
					      await enqueue(
 | 
				
			||||||
        guild_id,
 | 
					        guild_id,
 | 
				
			||||||
        voice_id,
 | 
					        voice_id,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue