DEV Community

Hung Nguyen
Hung Nguyen

Posted on

Contributed to AvBot Charts

Overviews

AvBot Charts is a Bot created to find data of the Airport based on user's request. Data contains name of the airport, the location, observed time, wind, temperature, etc. This bot is still in developing step but it is supported by a lot of businesses and developers. Also, the bot can link to discord and it has its own server.

Process and Issues

I asked the project owner to work on an issue which is adding a command-line to the bot so that it will list all playbooks that are disabled, since the current features only allow the bot to display airport and playbooks that are enabled. After getting accepted, I forked and started a new branch. Since in this semester, I have learnt how to create a CLI tool so I was quite familiar with this project. However, this project used completely different packages compared to my CLI tool so I needed to read documents, including commander, chalk. There is also a big problem related to understanding code since this is a big project that contains a lot of folders and files. After reading all the functions, and understanding them, I started to code. I sent pull request after, and the owner asked me to changes some features. He wanted me not to create a function but include it into a big function that contains other options of CLI. He also wanted me to check the code to pass the lint. After fixing the code, I sent him the final pull request and still waiting for his response.

Code explanation

Image description

  • Creating a new option to read -ld or --list-disabled
  • Creating a code block to handle that option.
  • Using readdirSync() to read the playbooks directory
  • Reading every single JSON file in playbooks and check if enable: false
  • Returning them to terminal.

About the owner

He was very friendly towards me. He invited me to the AvBot Charts server and treat me as a contributor that made me feel being valuable. He also instructed me what should look like in the output so I was less confused. Certainly, I will contribute to this project in the future.

Links

Repo: https://github.com/drph4nt0m/avbot-charts
Issue: https://github.com/drph4nt0m/avbot-charts/issues/353
Pull request: https://github.com/drph4nt0m/avbot-charts/issues/353

Top comments (0)