Spell/Ability full cycle question

Hello, I have a question. Is there a way to prevent a spell from being cast if it’s still active on the target?
Like, for example: Serpent Sting, is there a way for me to make that it doesn’t cast on my sequence if it’s still active on the mob?, it’s a waste of mana.

maybe man it would be the epochal breakthrough for addon. unfortunately though that i know of no, addon will throw you the spell at coldow and stop it can’t see the timers nne the proc aimè. already by itself it doesn’t even execute the written sequences actually because it goes very random. it would be nice if it was more precise and above all it would execute the rotations in the manner of how they are written and stop.

Translated with DeepL.com (free version)

This is a WoW limitation. The solution is to either write a better sequence so that it doesn’t get back to Serpent Sting until its ready to be used or change how you press the button so you are not pressing it until you are at the point that you want to spend the mana.