/
/

Always in working.

Let`s Connect

< Return

2023-05-04 · Anwari Fikri
Dev Log
/assets/blogs/building-my-first-discord-bot-4/borneo-bulletin.jpg

Building my first Discord Bot (4/4)

On 17th April 2023, I started a project on building my first discord bot called Borneo Bulletin Bot. This bot essentially scrapes articles from the Borneo Bulletin website, specifically in the headline section, and updates the user with daily news straight into their Discord server. Here are some of the key features of this bot.

Borneo Bulletin Bot /fetch_article command in action.

  • ✅ Scrapes the Headline category of a news website using Python and Selenium.
  • ✅ Retrieves all the headlines for the day.
  • ⬜ Uses GPT-3.5 to effectively summarize news articles.
  • ✅ Extract relevant images and include them in the post.
  • ✅ Posts the latest news in a Discord channel.
  • ✅ Includes a hyperlink to the original article.
  • ✅ Runs automatically at a specific time each day.

Invite Borneo Bulletin Bot to your server!

The bot is now available to the public which means you can invite it to your discord server and try it for yourself! Use /help to get started.

🌎 Invite Borneo Bulletin Bot

This project is also open source. You are welcome to contribute to this project.

🌎 Borneo Bulletin Bot GitHub Repository

Key Takeaways

I had fun building this bot and a few key takeaways that I learned while creating this are:

1. Planning before creating helps a lot.

Before I start coding, I plan my timeline and tasks on a task management tool called Jira. It helped me to focus on the core feature that needs to be developed for the bot. Planning also gives me the idea of whether I can finish my project realistically within the time limit that I set myself.

Jira timeline for Borneo Bulletin Bot

2. Join the community discord server related to your project and start asking questions.

The library that I used for developing this discord bot is called discord.py and they have an official community discord server for people to ask questions. The server provides useful reading materials and an active #help channel for people to ask questions regarding their problems when developing their discord bot.

It is always scary for me to ask questions in the #help channel because I always fear that I may ask some silly question, or ask questions that are already asked by other users. In the end, I just said, “screw it” and press the post button for my question. In less than 30 minutes, I got a response from one of the active members. He/She told me the cause of my problem and I immediately can focus on the cause of that problem. If I were to not ask that question, I probably would be stuck for a longer time trying to fix my problem which may or may not work.

🌎 Discord.py official Discord server

3. Working on a project with your own ideas is satisfying.

I worked on a lot of projects to practice my programming skills before. These projects are mostly like follow-along programming projects from YouTube or replicating an already existing website. I sometimes use my way of writing my code on these projects but the ideas themselves are not entirely from myself.

Working on this Borneo Bulletin discord bot make me feel motivated to finish it because the project is from my ideas and my initiative. The satisfaction of having a working product at the end of this project just feels different compared to completing a follow-along video from YouTube.

Me when I'm working and feeling motivated

Improvements

Some recommendations I have on how to make Borneo Bulletin Bot better.

1. Scrape other news sections.

Right now, Borneo Bulletin Bot only scrapes the headline from the Borneo Bulletin website. Users may also want to read international news or sports news.

2. Allow scraping by a given date.

Currently, the bot only scrapes the headline of the day. It would be nice to get news from a certain date.

3. Make a curated scraper.

It would be great if the user only receives the headlines that the user is interested in. Perhaps by having a like/dislike button and using machine learning to overtime adapt to the user preferences.

Conclusion

I will continue to work on this bot for the GPT-3.5 feature to summarize the news, but I won’t be updating them on my blog anymore. For my next project, I am still thinking about it, but I am planning to work on data science-related project or a database-related project.

Thank you for reading.

Hello, this is Anwari from the future. I decided that I won't be adding the summarize function because using OpenAI API requires money... and I'm broke 😭.

Random Blogs

Contact me

anwari.fikri@gmail.com


© 2023 | Anwari Fikri