0

я написал код на обнаружении слов в сообщении автора:

async def on_message(message):

    if 'word'   in message.content.lower():
        author = message.author
        muterole = discord.utils.get(message.guild.roles,id=772045965968408606)    
        await author.add_roles(muterole)
        await message.channel.send("не матерись, сенпай,тебе мут на 10 минут")
        await asyncio.sleep(1*60 )
        await autor.remove_roles(muterole)
        await client.process_commands(message)```

выдает ошибку: 

    ```await autor.remove_roles(muterole)
NameError: name 'autor' is not defined ```

1 ответ 1

0

Неверно написано autor

await author.remove_roles(muterole)

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge you have read our privacy policy.

Всё ещё ищете ответ? Посмотрите другие вопросы с метками или задайте свой вопрос.