Enchantment level passed to function?

If I have a custom enchantment that calls a function on post_attack, how can I know the enchantment level to use it inside the function?

Continue to help post