Creating a Discord Bot With Python

Before Starting

Acquiring the Jokes

Creating a Discord Application

Downloading the Discord.py Library

python3 -m pip install -U discord.py

Installing the Requests Module

pip3 install requests

Testing the Bot

python3 discord_joke_bot.py
$hello

Making API Requests With Python

Adding the $joke Command

import joke_api.py

Complete Code

Resources

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store