1

Hello World i just started working on a discord bot.

My bot can answer and send gifs, so my next step is to embed gifs.

Repl says: IndentationError: unindent does not match any outer indentation level

Any Help would be apprechiated!

Here is my code:

Sorry if its very basic ;-;

Code:

@client.command(hug)
async def reyhugs(ctx):
            embed = discord.Embed(
                title=":x: rey hugs @user",
                color=discord.Colour.purple()
            )
            embed.set_image(url="https://cdn.discordapp.com/attachments/821733999637561385/843251675275591720/steamuserimages-a.akamaihd.net.gif")
        await ctx.send(embed=embed)
cass si
  • 28
  • 4

2 Answers2

2

Your error message says it all. Your indention-levels don't match. As Python is an interpreter language, this is something you really need to look out for!

@client.command(hug)
async def reyhugs(ctx):
    embed = discord.Embed(
        title=":x: rey hugs @user",
        color=discord.Colour.purple()
    )
    embed.set_image(url="https://cdn.discordapp.com/attachments/821733999637561385/843251675275591720/steamuserimages-a.akamaihd.net.gif")
    await ctx.send(embed=embed)
itzFlubby
  • 2,269
  • 1
  • 9
  • 31
0

try this

and the way that you did write the code is wrong correct it and it will work

@client.command()
async def reyhugs(ctx):
    embed = discord.Embed(title=f":x: rey hugs {ctx.author.mention}", description="_ _",color=discord.Colour.purple())
    embed.set_image(url="https://cdn.discordapp.com/attachments/821733999637561385/843251675275591720/steamuserimages-a.akamaihd.net.gif")
    await ctx.send(embed=embed)
ArtyTheDev
  • 36
  • 1