@BillJ is correct, but let me explain why.
an object complement noun is usually a noun or adjective that modifies the direct object. The phrase "to stop complaining" is neither a noun or an adjective, which gives us the hint that it's not an object complement noun.
The sentence construction is catenative, meaning that the verb (in your case, "told") is followed by a function word ("to," "on," "for," etc.). In other words, a sentence of the form:
Subject verb1 [to|on|for|...] (predicate or...) verb2 (predicate)
Examples:
You stopped to observe the painting.
You stopped at the painting to observe.
In both examples:
- Subject = "you"
- Verb1 = "to stop"
- Verb2 = "to observe"
- Predicate = "the painting"
Catenative verbs can be thought of as verbs that need or are benefited by a following or associated action. Using my examples above, you could say...
You stopped at the painting.
Which is a complete sentence. By adding the "to observe" at the end puts the sentence in its catenative form and adds context to why you stopped.
For more information, please read this article at Wikipedia.