Inspiration

I came across a very interesting set of resources on building a Discord bot.

What it does

This bot responds to users' messages on a Discord server. When someone enters $hello, the bot will post a message saying "Hello!" The $inspire command will fetch and display a random quote from an API. When someone's message includes a word like "sad" or "angry", the bot will post an encouraging message like "Cheer up!" or "Hang in there." The $new command allows users to add a new message to the list of encouraging messages, the $del command deletes a message from the list of encouraging messages, and $list shows that list. The $responding command allows users to toggle whether the bot should respond to "sad" words in messages. There is also a feature that welcomes a new member to the server when they join for the first time.

How we built it

I built the bot using a Replit template for a Discord bot, a tutorial on building a Discord bot, and examples from the discord.py repository on GitHub.

Challenges we ran into

I ran into some errors involving bot permissions and empty message content, but I was able to resolve these issues mostly through the Discord Developer Portal.

Accomplishments that we're proud of

This is my first Discord bot!

What we learned

I learned how to build a basic Discord bot that can react to new messages and events like a member joining a server.

What's next for My Bot

I plan on expanding this bot with new functionalities or building new bots based on what I've learned.

Built With

Share this project:

Updates