In the case of Discord which would be today's MSN Messenger, it's not often done because your account will be terminated if you are found to be using a modded client.
Their API being freely accessible is irrelevant. If they decided to ban anyone using their API differently from their official client, they would be entirely within their rights. They probably won't though. It'd be a waste of time for them, bad publicity, and would just make the custom clients harder to detect instead of making them go away.
I don't have beef in the game, FWIW. I have greasemonkey loaded in my firefox and inject a bunch of custom mods in various webpages, including discord, to automate various parts of my workflow. Discord could probably detect it and ban me, but I guess so long as I don't use it for nefarious purposes, they won't.