Skip to content

Files

Latest commit

a79cae6 · Nov 15, 2020

History

History
47 lines (36 loc) · 2.2 KB

README.md

File metadata and controls

47 lines (36 loc) · 2.2 KB

cov-bot

cov-bot is a Reddit bot written in Typescript and running on Node.js accessing global data regarding the COVID-19 pandemic.

Usage

Comment on Reddit (use your own bot username if self-hosting):

u/cov-bot for a list of the top 30 countries by confirmed cases

u/cov-bot <country> for more specific stats on a certain country

Installation

Basic setup

Ensure that Node.js is installed and execute these commands:

# Instead of using git clone, you can download and extract the .zip file
$ git clone https://github.com/forkpoweroutlet/cov-bot
$ cd cov-bot
$ npm install

Reddit API

Go to reddit.com and create an account for your bot like any other Reddit account. Remember its username and password.

Now that you're logged in, head to your app preferences. When creating an app, specify its name, description, and redirect URI (http://localhost:8080 is fine), and tick the "Script" bubble. You can also add your personal Reddit account as a developer.

With the app created, take note of these credentials: App credentials Fill out these environment variables (put them in a .env file):

USER_AGENT="YOUR_USER_AGENT_HERE"
CLIENT_ID="YOUR_CLIENT_ID_HERE"
CLIENT_SECRET="YOUR_CLIENT_SECRET_HERE"
BOT_USERNAME="YOUR_BOT_USERNAME_HERE"
BOT_PASSWORD="YOUR_BOT_PASSWORD_HERE"

In the cov-bot folder, execute $ npm dev to start the bot.

Contributing

New Features

To request new features, Open an issue. Pull requests are welcome, but be sure to open an issue before you fork and open a pull request with your new code.

Bugs

Open an issue using the bug report template.

License

This project is licensed under the MIT license.

༼ つ ◕_◕ ༽つ