Skip to content

AntoniosBarotsis/coronaBot

Repository files navigation

Covid-19 Discord Bot

Build Status GitHub repo size

A simple discord bot/command line application that can query data about confirmed, death and recovered cases regarding Covid-19 and make plots with that data.

Table of Contents

Installation

  • Using a Discord bot: Download the repository and add a .env file in root containing your bot token and your preferred prefix (I used . as a prefix in the following examples).
  • Without a Discord bot: Run the code through your console by running npm run cv [arguments] in the root directory.

Usage

.cv [modifier] [country] [option]

  • modifier

    • c (confirmed cases)
    • r (recovered)
    • d (deaths).
      Inputting a modifier is optional and in the case of it's absence, confirmed cases are selected by default.
  • country
    All countries with recorded cases are supported. You have the option of typing all which will return you data for all countries combined as well as other which does the same thing minus China.

  • option (optional)

    • pie
      Prints a pie chart (no need for modifier). Example usage: .cv us pie
    • change
      Returns a chart showing the rate of change (modifier applicable). Example usage: .cv d italy change
    • compare [country 2]
      Plots both countries on the same chart (modifier applicable). Example usage: .cv r greece compare romania. Note that you can combine change and compare like so: .cv spain compare italy change.
    • log
      Plots a logarithmic graph instead of a linear one. Can be combined with compare.
    • top
      Plots a bar graph with the top 10 countries in terms of c/r/d cases. By default it plots the top 10.
      Extra arguments:
      • [number of countries]: changes the amount of countries displayed
      • m: Sorts countries by mortality rate
      • r: Shows countries in reverse order
    • combined
      Plots a line chart with recovered, deaths and active cases. If you include c,' + 'confirmed cases are included in the graph as well.

You can always use .help and .help [command] for a list of commands + usage.

Support

Please open an issue for support.

Contributing

Please contribute using Github Flow. Create a branch, add commits, and open a pull request.

Showcase

  • .cv all
    bruh

  • .cv other change
    bruh

  • .cv us pie
    bruh

  • .cv d greece compare romania
    bruh

  • .cv spain compare italy change
    bruh

  • .cv russia compare albania log
    bruh

  • .cv top 20
    bruh

  • .cv spain combined c bruh