The Stack Overflow Close Vote Reviewers chatroom maintains a collection of comments that can be used with the AutoReviewComments script.
You can find the comments on GitHub here. For your specific example we have a couple in stock. We have found over time that there are multiple types of link only answers, all warranting their own specific comment.
Feel free to provide feedback on any of these, either by submitting a pull request, filing an issue, have a chat in our room or leave a comment here.
I left the formatting untouched so if you hit edit on this answer you can easily copy the comment to earlier mentioned userscript.
[A] Duplicate link only
Please don't post link only answers to other $SITENAME$ questions. Instead, vote/flag to close as duplicate, or, if the question is not a duplicate, tailor the answer to this specific question.
[A] Link only to other SE
Please don't post link only answers to other Stack Exchange questions. Instead, include the essential portions of the answer here, and tailor the answer to this specific question.
[A] Link only answer
A link to a potential solution is always welcome, but please add context around the link so your fellow users will have some idea what it is and why it’s there. Always quote the most relevant part of an important link, in case the target site is unreachable or goes permanently offline. Take into account that being barely more than a link to an external site is a possible reason as to Why and how are some answers deleted?.
[A] Borderline Link-Only answer
This is a borderline link-only answer. You should expand your answer to include as much information here, and use the link only for reference.
[A] Borderline-spam link answer
Please be careful with linking to your own content on different sites, you don't want to be a spammer. You should be including the majority of the content here, and use the link only as a reference.
I find myself often use the third option from the above list.