I’m saying that:
Making your code as secure as possible is the responsibility of everyone who writes code with a public interface of any kind, like bots for a Discord server.
Code that interacts with IP interfaces, even to read them, is riskier than birthday messages or character builds. Those may still be vulnerable, but it’s less likely.
Discord, as a tool used by so many people, presents a risk as well. When you look at your code, you have to look at the entirety of the codebase. Your software doesn’t stand alone. It is the tip of a huge iceberg. You are relying on the 99% underneath you to also be secure, and that your tiny part doesn’t exacerbate some vulnerability in the rest.
Cybersecurity is a real challenge, and a great place to have a career. The biggest challenge is that you only have to make one mistake to fail, while all the scanners and bots out there can keep trying all the time.
Here’s a good place to start: https://www.amazon.com/Deadly-Sins-Software-Security-Programming/dp/0071626751 — although the advice on burying options in complex UIs is completely wrong.
Unfortunately, most of the university programs lag significantly behind industry. I've interviewed candidates with graduate degrees in cybersecurity that were not aware of most modern techniques used to find persistent adversaries. The good things those programs provide is a broad coverage of information security as a whole.
I saw you mention "finding the vulnerabilities before the bad guys do". Unfortunately, in the real world the code is either unpublished and you're a software security consultant, analyst, or tester, or it is published and you're fixing a hole that the adversary has already discovered. If your interest is in the software security side, I would recommend two books above all others.
The 24 Deadly Sins of Software Security: https://www.amazon.com/Deadly-Sins-Software-Security-Programming/dp/0071626751?_encoding=UTF8&%2AVersion%2A=1&%2Aentries%2A=0
Writing Secure Code: https://www.amazon.com/Writing-Secure-Code-Strategies-Applications/dp/0735617228/ref=sr_1_1?s=books&ie=UTF8&qid=1499038741&sr=1-1&keywords=writing+secure+code
That said, there is also a lot of work in the systems engineering side of the house - along the lines of credential theft and secure enterprise design. If you think this might be interesting to you, I would recommend reading papers such as these:
Microsoft Pass the Hash Whitepaper: https://www.microsoft.com/en-us/download/details.aspx?id=36036
Think Like a Hacker (shameless plug for my book): https://www.amazon.com/Think-Like-Hacker-Sysadmins-Cybersecurity/dp/0692865217/ref=sr_1_sc_1?ie=UTF8&qid=1499038880&sr=8-1-spell
Cybersecurity is typically broken into various subfields, such as reverse engineering, forensics, threat intelligence, and the like - each with its own set of tools and skills. Ultimately, I would recommend attending a decent hacking conference such as DEFCON, DerbyCon, ShmooCon, or the like to get familiar with the field.
Not sure what everyone uses, but http://www.amazon.com/Deadly-Sins-Software-Security-Programming/dp/0071626751 is a good place to start. Not all internet stuff, but the base ideas of how hacking works.