[Solved] “Expected an indented block” error while coding python for discord bot [closed]


Looks like it’s this section:

async def raid(ctx):
while True:
await ctx.send("""@Raider come show some support and join the raid!
Meet: (link1)
Target: (link2)
Raid Call: """)
await asyncio.sleep(5)

Just needs to be indented properly:

async def raid(ctx):
    while True:
        await ctx.send("""@Raider come show some support and join the raid!
        Meet: (link1)
        Target: (link2)
        Raid Call: """)
        await asyncio.sleep(5)

After declaring the function def raid(ctx): the block below needs to be indented. Then for the conditional while True: it’s block needs to be indented as well.

If you are looking to get into Python, I’d suggest this course, it’s free and pretty fun:

https://www.codecademy.com/learn/learn-python

6

solved “Expected an indented block” error while coding python for discord bot [closed]