Discord Ears Bot on Heroku
Tags: node, javascript, heroku, devops
Published: 2021-01-01 16:17:27

I've been getting a lot of requests for a step-by-step tutorial on how to install my Discord Speech-To-Text bots.

In this tutorial I will show you how it's done using a free Heroku cloud service. I will be installing our **Discord Ears bot**: https://github.com/healzer/DiscordEarsBot

*To install the Discord Speech Bot, you'll also need to obtain the Spotify API keys (more info here: https://github.com/healzer/DiscordSpeechBot)*

**1.** Create and login to your Heroku account (https://heroku.com/). It is free and no credit card required. You'll see the following screen, allowing us to make a new app:

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/opvugrprrltgb27532gg.png)

**2.** Make a new app, give it some name and set your region:

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/klhaeeg13rmszxpe3xns.png)

**3.** The easiest way to deploy the code is by forking the Github repository, a copy of the repo will be added to your Github account which you can use:

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/6131s469yxlhe8u2qyax.png)

*Alternatively you can use Heroku CLI tools, but that's beyond our scope and for advanced users only.*

**4.** Once forked, select GitHub as deployment method and connect the DiscordEarsBot repository:

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/p19377wf8ebeouglntlz.png)

**5.** Scroll down and click on "deploy branch". It might take a minute or two until it's done:

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/e94wk31b10yy1fjf18ha.png)

**6.** Now we need to provide some API keys for the bot. Go to the settings tab and click to reveal the config vars:

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/z37bs0zbg53q3mlhyo8x.png)

**7.** Here you have to provide the necessary API keys as key-value pairs.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/a6svn1wocz87vw6qnxop.png)

The ["settings"](https://github.com/healzer/DiscordEarsBot#settings) section on Github explains where you can get your API keys from. *(The Discord Speech Bot requires two additional API keys.)*

**8.** Go to the Resources tab and you should see two Free Dynos: a web and worker type. You need to disable the web and enable the worker dyno as such:

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/3wzpieifdwoivduy4jm3.png)

**9.** Now you're ready and set. You can see the output logs from the bot by clicking on "more" and then "view logs"

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/8ongzwcmn6l4p288z6z0.png)

**10.** Make sure you've invited/added the bot to your Discord server. In case you haven't, you get the invite link on the developers portal, just open that link in your browser and follow the steps:

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/d2eoxj4lumc6ddtwzswx.png)

**11.** With the bot invited you can make the bot join a voice channel, and as you speak you'll see logging info on Heroku, and the bot should also be doing its job:

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/61lsmsip2gtncgzce09w.png)

Make sure to give our Github repo a star and join our [Discord community server](https://discord.gg/ApdTMG9).

Happy 2021!!! <3