logo

Coronavirus Live Updates Discord Bot

🧰 Prerequisites

  1. Install NodeJS

🚀 Development

  1. Install Prettier ESLint VSCode Extension
  2. Locate the repository in terminal/bash
  3. Install dependencies - npm install in the repository directory
  4. Run node index.js in the repository directory

Environment Variables

Rename .env.sample file to .env.

  • DISCORD_AUTH_TOKEN
  • DISCORD_CHANNEL_ID
  • DEFAULT_COUNTRY_CODE - Set Country Code (find country code in countries.json, e.g. HK)

Add a country

  1. Open countries.json
  2. Find country URL at https://www.worldometers.info/coronavirus/
  3. Add key value pair object to countries.json array

Example:

{
    "country": "CA",
    "url": "https://www.worldometers.info/coronavirus/country/canada/"
}

🎁 Production deployment

  • Add production environment variables
  • Run npm run build in the repository

👷 Built With

📚 Author