All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
If the wording that you mentioned is just a warning and a threat of divorce meaning that you will divorce your wife if she disobeys you, then divorce does not take place just because she went there unless you initiated divorce, the thing that you should not do.
However, even if you explicitly conditioned divorce like if you had said to your wife ‘you are divorced if you attend the marriage ceremony’, then divorce does not take place as she did not attend the marriage ceremony upon which you conditioned her divorce as you mentioned.
In any case, what should be taken into account in breaking your word and whether or not divorce takes place accordingly is your intention regarding your wife's attendance: did you intend her attendance of the marriage ceremony or her visit to the house of her cousin? Al-Mardaawi said: “If she [the wife] goes out in a manner that differs from that which he [the husband] intended, then he is not breaking his oath.”
Allaah Knows best.