Reputation: 29
i have error IndentationError: unindent does not match any outer indentation level
, i checked this - discord bot - userinfo command "IndentationError: unexpected indent", but i didn't get how to fix my code
error in this line - emb = discord.Embed( title = f'{ ctx.author } | { ctx.author.display_name }', color = discord.Color.green(), description = f'{ctx.author.id} |' )
and here is all my function
@client.command( aliases = ['uinfo'])
async def userinfo( ctx ):
emb = discord.Embed( title = f'{ ctx.author } | { ctx.author.display_name }', color = discord.Color.green(), description = f'{ctx.author.id} |' )
emb.set_thumbnail( url = ctx.author.avatar_url )
emb.add_field( name = 'Joined server', value = f'{ - }' )
emb.add_field( name = 'Joined discord', value = f'{ - }' )
await ctx.send( embed = emb )
Upvotes: -1
Views: 74
Reputation: 177
This is a typical python error not related to the discord.py; this error may occur if you mixed spaces and tabs to indent. To solve it make sure to delete the blank spaces before each line (lines around the error) and replace them with either spaces or tabs (depends on what you are using in your code).
Upvotes: 0