У меня возникла ошибка с модулеє random

Часть кода:

async def buy(ctx):
      text = None
      channel = Bot.get_channel(694249208936530012)
      random1 = random.randrange(1,8)

Ошибка: File "Discord-Bot-Test-1.py", line 26 random1 = random.randrange(1,8) ^ IndentationError: unindent does not match any outer indentation level Press any key to continue . . .


Ответы (1 шт):

Автор решения: Alioshca Z

У вас отступы в функции неправильные. Выровняйте:

async def buy(ctx):
    text = None
    channel = Bot.get_channel(694249208936530012)
    random1 = random.randrange(1,8)
→ Ссылка