✅ Add voice channel disconnect test
This commit is contained in:
		
							parent
							
								
									96b273ed04
								
							
						
					
					
						commit
						3fe5ce3063
					
				
					 1 changed files with 4 additions and 9 deletions
				
			
		|  | @ -14,15 +14,10 @@ export default class KickFromSpecificVoiceCommand extends Command { | ||||||
|       } |       } | ||||||
| 
 | 
 | ||||||
|       // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
 |       // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
 | ||||||
|       const voiceStates = await (channel as VoiceChannel).voiceStates.array() |       const members = await (channel as VoiceChannel).disconnectAll() | ||||||
|       if (voiceStates !== undefined) { |       members.forEach((member) => { | ||||||
|         voiceStates.forEach(async (voiceState) => { |  | ||||||
|           const member = await voiceState.disconnect() |  | ||||||
|           if (member !== undefined) { |  | ||||||
|         ctx.channel.send(`Kicked member ${member.id}`) |         ctx.channel.send(`Kicked member ${member.id}`) | ||||||
|           } |  | ||||||
|       }) |       }) | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
| } | } | ||||||
| } |  | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue