Ben Taylor

Ben Taylor

1596098856

How to Create a Discord Bot to Track COVID-19 with Nodejs

In this article, I’ll show you how to:

  1. Build the most basic Discord Bot.
  2. Link the Bot to a Discord Server.
  3. Add functionality to track Coronavirus cases for a given country.

Here’s a sneak peek of the final result.

Image for post

Gif of the Coronavirus Discord Bot — Created by Author.

Before we begin

Make sure you have these:

  1. Node.js installed locally on your machine.
  2. A Discord account.

Discord Developer Portal

Application

Create an application in the Discord Developer Portal

Once it’s created, you should see the Client ID. This will be used later on to connect the app to a discord server.

Bot

Before we can connect our application, we need to create a Bot.

Select Bot from the left menu, and then click Add Bot.

Image for post

Screenshot of the Discord Developer Portal

When the Bot is created, you should be able to click to reveal its access token. This token is used to connect the Bot to our code.

Image for post

Screenshot of the Discord Developer Portal

#nodejs #javascript #discord #covid 19

How to Create a Discord Bot to Track COVID-19 with Nodejs