If you are using cogs you don't have to import main. Just give a look to the discord.py docs and you will see that cogs must be like this:
import discord
from discord.ext import commands
class MembersCog(commands.Cog):
    def __init__(self, bot):
        self.bot = bot
    @commands.command()
    @commands.guild_only()
    async def joined(self, ctx, *, member: discord.Member):
        """Says when a member joined."""
        await ctx.send(f'{member.display_name} joined on {member.joined_at}')
    @commands.command(name='coolbot')
    async def cool_bot(self, ctx):
        """Is the bot cool?"""
        await ctx.send('This bot is cool. :)')
    @commands.command(name='top_role', aliases=['toprole'])
    @commands.guild_only()
    async def show_toprole(self, ctx, *, member: discord.Member=None):
        """Simple command which shows the members Top Role."""
        if member is None:
            member = ctx.author
        await ctx.send(f'The top role for {member.display_name} is {member.top_role.name}')    
    def setup(bot):
        bot.add_cog(MembersCog(bot))
And in main.py: bot.load_extension('folder_name.file_name')
This is just an example.