• Как в discord.py сделать ветку команд?

    @Romanok2805
    is_vote_started = False
    total_count = 0
    max_count = 5
    list_mentions = []
    
    if message.content.startswith('!мм'):
        await message.delete()
        if is_vote_started:
            await message.channel.send(f'Голосование уже начато')
            return
        list_mentions.append(message.author.mention)
        is_vote_started = True
        total_count = 0
        await message.channel.send(f'@everyone кто мм? Пока что идет {message.author.mention} {total_count}/{max_count}')
    
    
    if message.content.startswith('я'):
        if not is_vote_started:
            return
        total_count += 1
        list_mentions.append(message.author.mention)
        
        if total_count == max_count:
            is_vote_started = False
            await message.channel.send(f'Набрано {max_count} участников {total_count}/{max_count} {", ".join(list_mentions)}')
        else:
            await message.channel.send(f'@everyone кто мм? {total_count}/{max_count} {", ".join(list_mentions)}')
    Ответ написан