mirror of
				https://github.com/veganhacktivists/arabot.git
				synced 2025-11-04 16:20:55 +01:00 
			
		
		
		
	feat(arabot): add check so there can only be one leader of a group
This commit is contained in:
		
							parent
							
								
									cd3c209ede
								
							
						
					
					
						commit
						6a96772c25
					
				@ -271,6 +271,11 @@ export class OutreachCommand extends Subcommand {
 | 
			
		||||
 | 
			
		||||
    await interaction.deferReply({ ephemeral: true });
 | 
			
		||||
 | 
			
		||||
    if (await getStatFromLeader(leader.id) !== null) {
 | 
			
		||||
      await interaction.editReply(`${leader} is already a leader for another group!`);
 | 
			
		||||
      return;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    const event = await getCurrentEvent();
 | 
			
		||||
 | 
			
		||||
    if (event === null) {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user