Table of Contents

1. Install discord.py and python-dotenv

Assuming you already have Python and pip installed, you're going to want to run these commands in a terminal:

pip install discord.py
pip install python-dotenv

2. Create a Discord application and bot

Before getting into the code, we need to create a “Discord application.” This is essentially an application that holds a bot. It can be accessed on http://discord.com/developers

The page is going to look a little something like this:

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/4de88445-2502-4d59-a937-9a90a07b27ae/5e5f6739585f68cc4a4356021e7b1421.png

Click on the "New Application" button in the top right of the screen: