Inspiration

I was inspired to create the GoodVibes Discord chat bot because, I found that there was a lack of discord bots that focused on positivity and mental health. Both of which are very important in today's society. So, I sought out to create a chat bot that could fill those needs during this hackathon.

What it does

The GoodVibes chat bot, will prompt a user with either a motivational quote or joke. Along with performing daily checkups and providing resources for those who struggle with mental issues.

To perform these actions, users can run a set of commands to do so:

  • !dailymotivation
  • !dailycheckup
  • !mentalhealth
  • !joke

How I built it

I built the GoodVibes chat bot using Node.js, and the Discord.js module, all within the Replit IDE. By implementing the Discord.js module I was able to create the functionalities for each of the different commands. Such as accessing a random value within an array and returning that value as a Discord message.

Challenges I ran into

In the beginning, I ran into the issue of my Discord bot not responding to the commands. However, I noticed that some of my bot's settings were incorrect, and the particular version of Discord.js was not compatible with the code I had written. To solve this I, downgraded to an older version of Discord.js and updated the settings of my chat bot.

From there, my Discord bot began responding to each of the commands when typed in the server chat.

Accomplishments that I'm proud of

I'm proud of my resilience throughout this hack. I was struggling in the beginning with getting started and trying to fix every slight error I began running into. However, I didn't give up and I continued to keep trying until I found success.

Now, my Discord bot runs how I want it to; without any error at all!

What I learned

By programming this Discord bot, I learned about Discord.js and each of its different versions. Along with how each version has a specific set of requirements or prerequisites when programming.

For example, when I was running a newer version of Discord.js, I kept running into errors regarding not stating specific intents. By researching this issue I learned that when programming with Discord.js' version 14.0 you need to state your intents if you want your Discord bot to run or function properly.

However, I later resolved this error and downgraded to an older and more reliable version of Discord.js.

I also learned how to correctly install Node.js on the Replit IDE and on a computer terminal as well. Which is something that used to confuse me in the past.

What's next for GoodVibes Discord Chat Bot

I plan on adding more feature in the future. Such as a resource submission feature. Where users can use a command such as '!submitresource' in order to submit a helpful mental health awareness resource or a place for those suffering from mental issues to receive help; to a resource document.

I would also like to find a hosting platform for my chatbot, because in its current state it only functions when the Replit file is being ran. By hosting it on something such as a cloud, the bot would be able to run at all times.

Built With

  • discord
  • discord.js
  • node.js
  • replit
  • zenquotes
Share this project:

Updates

Submission history