This post was featured on Bugcrowd, with some minor changes. You can read it there if you like.
About me
My name is Liv, and I'm a college student. During the academic year, in addition to classes, I work at an IT helpdesk where I answer the phone, respond to emails, and even walk or drive to fix issues on-site. Before college, I was always "the one to call" in the family for technology help. Turns out, helping people with their tech problems over the phone is a skill you can apply to more than just technology.
On weekends and academic breaks, I love to work on projects. Sometimes, these end up as folders on my desktop with 12 lines of code— abandoned part-way and never opened again. Other times, they grow to hundreds of files and end up published to GitHub.
One of these projects has certainly stood the test of time as the most highly-used and well-received of my projects. For the past 5 years, I've been developing and maintaining a Discord bot to help prevent suicide.
Why I'm doing it
Originally, I was just looking for a way to learn Discord bot development, so I looked around for project ideas. One of them on my list was this bot idea, though I was certain that it had to have been done before. I couldn't find one. Every year, over 700,000 people die by suicide. If a project I make could make that number go down by even 1, it would be worth it. So I made it.
How I built it
The first iteration of the bot was built with DiscordJS, and all it did was scan the chat for messages with some keywords and key-phrases. If it saw anything, it would reply with a message displaying lifelines for 3 different countries, and a link to a list with more. Then, I launched it with a post on Reddit.
I hit the 100-server limit almost immediately.
Turns out, Discord caps a bot's server enrollment at 100 unless the bot is "verified".

In classic Discord fashion, it took them a month to actually verify it.
The time waiting, however, was well spent. Plenty of people wanted to collaborate, since it was open-source, and we worked to add more languages, more lifelines, and more features.
By May 2021, the bot was in a much more stable and fleshed-out state than it had been just a month prior. Users could now manually direct the bot to help people when the keyword-list system didn't work, and users could now opt out of being responded to if they found it annoying.
Scalability
As the bot grew in popularity, past 500 servers, past 1000 servers, it became increasingly clear that the bot needed to scale. A single-threaded bot will only hold up for so long. Luckily, DiscordJS has a built-in sharding system, requiring only a small amount of modification to implement.
Another issue with scalability was the technical debt. The first iteration of the bot looked like it was written by someone who had never made a Discord bot before. Because that's exactly what happened. Cue a bunch of people all trying to help commit code, almost none of whom had built a Discord bot before either, and you're just doubling the issues.
So… I rewrote it. I deleted it all, and started over. New DB (MySQL), new DiscordJS structure, and new classification system.
The new classification system does away with the terrible keyword-list. It's time for everybody's favorite new investor buzzword ✨AI✨, also known as "binary text classification through TensorFlow". Problem is… I can't exactly train a model if I don't collect data on my users. Luckily, there are public datasets for exactly this kind of classification. I combined a few of them together, and trained a model. After a bit of trial and error, I got the model honed down to something reasonably accurate. Now what happens when I do find a message showing signs of suicide?

Turns out, people live everywhere.
Who could have guessed?
The United Nations states that there exist 193 nations. Unfortunately, that's not really super helpful for listing suicide lifelines. Some countries have overseas territories on the opposite side of the globe. Linking those people to a lifeline whose operating hours are meant for the mainland isn't exactly helpful.
I found a country list online, which I used as a vague starting place, though I added quite a few places. All in all, I came up with a list of 240 places. One example is Norfolk Island (pop. 2,188), which I added because despite being a territory of Australia, it has an independent phone number to reach a mental health counselor.
How do I know this? Because I googled the name of all 240 areas followed by "suicide lifeline". Most disheartening to see was that a good half of them had no results at all. Perhaps I couldn't find one because I was searching in English, or perhaps there simply was no organization to provide assistance at all. New organizations may have popped up since I initially looked as well, so I'll need to update it as some point.

I collected more than just numbers, too. I cite as many as I can to the websites of those running the lifelines, as well as donation links and any other information people may like to know before they call.
My personal "favorite", if you could consider someone to have a favorite suicide lifeline, is the one of Tonga, a small island nation of just over 100,000 people. It's run by a church, built with Blogspot, and uses a Calligraphy font for the entire website. Perfection. In all seriousness, I commend them for starting up such a service, especially when my city alone outnumbers their entire country 40-to-1.

What I hope people will gain from this
If there's one lesson I want people, especially beginners, to take away from this story, it's that it's okay to just start making stuff. The way I first approached this, was not structured very well. I wasn't following any kind of tutorial or video, and it certainly showed. The things I learned from that time stuck with me more than any book or article ever could, and I couldn't have done the refactor, machine learning, and database if I hadn't started with a simple keyword-list and convoluted code.
If you have an idea you've wanted to try or topic you've wanted to learn, you're not going to get anywhere by reading blog posts. Just go make stuff, you don't need to know what you're doing. You learn by doing and figuring things out by yourself.
Take this sentence as your sign to start that project idea you've been considering,
Conclusion
Today, this bot is humming away on my desk. I host it at home on dedicated hardware— an old Dell OptiPlex saved from getting sent to e-Waste. It gets a new life hopefully saving the lives of others. In fact, I know it has. I've gotten several thank-you messages from people.
I plan to keep hosting and maintaining it for as long as suicide is a problem.
17% of deaths in those aged 15-19 (large demographic of Discord users) are from suicide. It's the 3rd most common reason for someone aged 15-29 to die. It's not just the youth, either. 42% of suicides are by those over 50. Overall, more than 700,000 people take their own lives each year.

This month, though, there is one especially important group to highlight. In June 2021, for pride month, the bot icon gained a couple pride flags. It still has them 4 years later. This is because suicide among LGBTQ people doesn’t stop needing visibility at the end of the month. About 80% of trans people will consider suicide, and half of those will attempt. Suicide prevention among LGBTQ people needs to be highlighted, no matter the month.
I'd like to thank Bugcrowd for giving me the opportunity to highlight my project, especially Emma, who has been incredible in engaging the online Bugcrowd community.