Discord.py Rewrite won't recognize commands.Cog

Hi there i just finished putting together the cogs for my discord.py bot and i was getting ready to upload it to heroku but in my cmd i received an error saying cogs must derived from Cog. So i reformatted my code but now im getting an error saying discord.ext.commands has no attribute Cog. So i tried updating rewrite to 1.2 but that didnt do anything. I dont see anything wrong in my code any ideas

main bot.py file

@client.command()
async def load(ctx, extension):
    if ctx.message.author.id in bot_admins:
        client.load_extension(f'cogs.{extension}')

@client.command()
async def unload(ctx, extension):
    if ctx.message.author.id in bot_admins:
        client.unload_extension(f'cogs.{extension}')

for filename in os.listdir('C:/Users/video/Desktop/Romani/cogs'):
    if filename.endswith('.py'):
        client.load_extension(f'cogs.{filename[:-3]}')

Cog

import discord
from discord.ext import commands

class events(commands.Cog):

    def __init__ (self, client):
        self.client = client

    @commands.Cog.listener()
    async def on_ready(self):
        print('I have been summoned')

    @commands.Cog.listener()
    async def on_member_join(self,member):
        for channel in member.guild.channels:
            if str(channel) == "general":
                await channel.send(f"Welcome to the {member.guild.name} discord server, {member.mention}")

    @commands.Cog.listener()
    async def on_member_remove(self,member):
        for channel in member.guild.channels:
            if str(channel) == "general":
                await channel.send(f"{member.name} has left the server.")

def setup(client):
    client.add_cog(events(client))

Having a similar issue as well. I’ve run into an Attribute Error claiming ‘listener’ is not a valid attribute within discord.ext.commands.cog. Discord.py is up to date. If you’ve come to any realizations or have any tips, Your input would be most appreciated.