F
F
F1azy2022-04-14 16:49:01
Python
F1azy, 2022-04-14 16:49:01

Why does it give an error with embed?

@bot.command()
@commands.has_permissions(administrator=True)
async def помощь(ctx):

  emb = discord.Embed( title = "Помощь по командам", colour = discord.Color.purple())

  emb.add_field( name = "-очистка", value = "Очистить чат" ),
  emb.add_field( name = "-бан|разбан", value = "Забанить участника|Разбанить участника" ),
  emb.add_field( name = "-кик", value = "Кикнуть участника" ),
  emb.add_field( name = "-мут|размут", value = "Замутить участника|Замутить участника" ),
    emb.add_field( name = "-жалоба", value = "Подать жалобу на участника|Задать вопрос администрации" )
  await ctx.send( embed = emb )


Gives an error: C:\Users\pasha\Desktop\bot>py bot.py
File "C:\Users\pasha\Desktop\bot\bot.py", line 55
emb.add_field( name = "-complaint", value = "Report member|Ask admin a question" )
^
IndentationError: unindent does not match any outer indentation level

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Nesterov, 2022-04-14
@F1azy

The problem here is not the embed, but the ignorance of the python. You are clearly told that the problem is with indentation.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question