discord.py with python 3.9 code example Example 1: how to import discord in python py -3 -m pip install -U discord.py Example 2: import discord python import discord