'Python denies that discord.ext exists although I have downloaded it

I've downloaded discord.py from the command shell, but when I try to write the code, python denies discord.ext's existence. I don't want to show my token here, but I did type a token in my original code

import os

import discord
from discord.ext import commands

TOKEN = ''

bot = commands.Bot(command_prefix="!")


@bot.event
async def on_ready():
    print(f'{bot.user} succesfully logged in!')

bot.run(TOKEN)

async def on_message(message):
    if message.author == bot.user:
        return





    if message.content == 'yee yee':
        await message.channel.send (f'yee {message.author}')



    await bot.process_commands(message)



bot.run(TOKEN)


Solution 1:[1]

import imports a module name, or imports names from the specified module. If the only file you have is discord.py then whatever discord.ext names is not an available module. Possibly you need to download additional modules, or possibly discord.ext is simply something (a class, for example), from which one cannot import.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1