Make a Discord Bot in Python - Part 2

Опубликовано: 03 Март 2026
на канале: DevDungeon
38,101
461

Learn how to extend a simple Discord bot.

Important note: The discord.py version used here is 0.16.12. The version of Python used is 3.6. Python 3.7 introduced backwards incompatible changes with async. The new version of discord.py 1.0 is also incompatible with this code here. Make sure you follow the instructions closely and ensure you have the proper versions. discord.py==0.16.12, python below 3.7.

The bots include custom commands, background tasks, event triggers, and more. It assumes you already have a Discord server and a bot user to test with. If you don't, refer to the previous video for a walkthrough of how to create a Discord server, create a bot user, and get started with the Python library.

Frequently asked questions:
Where do I run "python -m pip install discord.py" - You run it in your system command prompt or terminal
Syntax Error - The code works up through Python 3.6. In Python 3.7 async became a reserved keyword. Change `asyncio.async` to `async` in the code.
I get Discord library errors when trying to run. Make sure you have the correct version of discord.py installed. Run `pip list` to see what version you have. Make sure you have 0.16.12 and not 1.0. `pip uninstall discord.py` and `pip uninstall discord` to ensure you have removed all versions, then `pip install discord.py==0.16.12`.


Links:
https://www.devdungeon.com/content/ma...
https://www.devdungeon.com
https://www.devdungeon.com/content/ch...
https://www.devdungeon.com/content/ai...
DevDungeon Discord:
  / discord  
Part 1 - Make a Discord Bot with Python -    • Make a Discord Bot in Python  
https://discordapp.com/developers