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

--

--

--

Web developer https://github.com/AlanConstantino

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Monorepo setup in Serverless Architecture

Unix Pipelines with cURL requests and Serverless functions

The Low-Code Market In The Enterprise Segment — Gartner Magic Quadrant

Git Installation Along With It’s Commands.

India’s Aadhaar And MongoDB

Bedrock Third Person Camera

| Engineering News-Record

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
Alan Constantino

Alan Constantino

Web developer https://github.com/AlanConstantino

More from Medium

How to make a Reddit ticker scraper

Flask + ImageCaptcha — Securing your login and registration form

Creating a login API with Flask

How I Created & Deployed Telegram Bot 🤖 in Just 10 Minutes in Python