Project Submitted to HackUMass 7.

Invite Today!

Description as a Tweet:

Vine is dead, but Discord is alive and well. Let VineBot bring back nostalgia from the good old years of 2016 and soothe you with some favorite classics such as "I Could've Dropped My Croissant". Just say that familiar vine keyword, and be prepared to take an existential journey.

Inspiration:

We had never made a Discord bot before and thought it would be fun and a good learning experience. We also love Vine and wanted to help preserve it.

What it does:

Our project is a Discord bot with 3 functions:

  • It responds to direct commands to list possible commands, give a Vine compilation, or give a random Vine.
  • It responds to mentions with a random Vine related response from a list of prewritten responses.
  • When it detects keywords from a famous Vine, it responds with a link to the Vine the keyword is from.

How we built it:

We used Discord's Dev Portal to create the endpoint for the bot. The core program used Node.js (Javascript) with libraries such as Eris to establish the connection. We initially used an SQL database to store the vine keywords but settled to use a JSON object for better convenience. When It was complete, we deployed it to a DigitalOcean Droplet with Node.js pre-installed and added bot.js to the init.d section of Linux.

Technologies we used:

Javascript Node.js SQL Python

Challenges we ran into:

The first challenge was to get the API connected to Node.js. The dev layout was that three of us needed to test the bot individually to make sure our code was working. Despite knowing better, we included the .env file in the git commits. Apparently, Discord web crawls for its API token and re-generates it as a panic mechanism. We ended up removing the token from GitHub and the bot started working again. We also found that SQL was challenging to work with because we needed a specific query to search for substrings. Switching to JSON Objects was sufficient.

Accomplishments we're proud of:

That we got this thing built and up and running 24/7 with its intended functionality.

What we've learned:

We learned how to build a Discord bot and the nuances thereof. Things like how to prevent the bot from calling itself recursively when the help command is triggered, how to have the bot differentiate between commands and normal messages, how to have the bot do the things we wanted it to, and how best to store the data the bot was using.

What's next:

Adding more Vines to its library of possible options, improving the detection algorithm to function efficiently with a larger list of keywords, possibly adding more direct commands.

Built with:

We used Node.js and the Eris library for the backend deployed on DigitalOcean Droplet.

Prizes we're going for:

Best Web App Best Documentation Funniest Hack

Built With

  • but-discord-is-alive-and-well.-let-vinebot-bring-back-nostalgia-from-the-good-old-years-of-2016-and-soothe-you-with-some-favorite-classics-such-as-"i-could've-dropped-my-croissant".-just-say-that-familiar-vine-keyword
  • digitalocean
  • eris
  • json
  • node.js
Share this project:
×

Updates