Inspiration
Every quarter, it seems like students always have either too much or too little SlugPoints. To help prevent the waste of SlugPoints, I created a Discord Bot that helps solve this problem. In fact, I saw this firsthand myself when I was in a rush to spend 300 dollars in 2 weeks, which sounds easy but with long lines and everybody else in a rush, it took a while. While I was successful, many were not. For example, my Roommate had about $800 unspent slug points which ended up going to waste as they don't roll over. He said that it was too much hassle to spend all of the SlugPoints. This is why I made this Discord Bot, to make it as frictionless as possible to spend SlugPoints and exchange them for things people actually want. I also sought inspiration for this idea as I sometimes saw people on the UCSC Reddit page willing to trade SlugPoints for Goods and Services such as keyboards, clothes, etc. Making this Discord Bot open to everybody allows them to add it to their own UCSC discord Server if they choose to.
What it does
The premise is simple. Users can view active listings or make one of their own. To do this, the user types "START" into the "create-listing" channel and it begins. They are asked a series of questions on what they have and what they want in exchange. It can be anything from swipes into the dining hall or even a Coffee at the Oakes Café. Then the listing with their item, what they want in return, item photos, and contact info is shared for all to see.
How we built it
To build it, I had to use a fair bit of Python and a bunch of Python libraries that are specific to Discord and it's API and how to make a bot that can read and send messages.
Challenges we ran into
One problem that I faced was the fact that for some reason, my messages were not being read or interpreted by the Discord bot even though I had given it all the permissions it needed. I had to spend hours figuring out what went wrong and configuring the code correctly to allow it to read messages. Then the next major problem was that it wasn't processing images correctly. To solve this, I made it so the listing would require the user to upload an image of what their item looked like. And another major problem was that it would keep repeating phrases over and over again which also took me by surprise. To fix that, I had to set it so it would only send the message prompting the user to Start only if the questions haven't been asked.
Accomplishments that we're proud of
One thing that I'm glad that I got working is the fact that the Discord bot even responded at all because that took me the longest to figure out. Once I got that sorted, it was just a matter of making the questions and storing the user input then sending them out to the output section. I initially wanted to do a basic little python script to demonstrate the concept but I wanted people to actually be able to use it and see it in action so I converted it into a Discord bot, which took longer than I expected but glad that I did as now I learned the basics of making a Discord Bot.
What we learned
I learned how to the discord libraries in Python but my biggest lesson was that just because something looks easy doesn't mean it actually is easy. Getting everything sorted and figured out and dealing with all the bugs took a good amount of time because I wasn't quite familiar with how the discord python library worked. A good portion of my time was spent on fixing things.
What's next for Slugpoints Exchange
I am considering the possibility of opening the server up and allowing people from UCSC to join it and create listings of their own. If this get's enough traction, I will team up with others who know web design and maybe make it into a website. There are many things that I need to test and implement before I am confident that it's ready for release. But I'm glad to allow anybody to create a Discord bot of their own and implement the code for themselves so they can use it on their own Discord server if they please.
Built With
- discord
- python
Log in or sign up for Devpost to join the conversation.