Делаю всё по документации:
@bot.command()
async def ban(member_id, ban_reason):
await ban(bot.get_user(member_id), *, reason=ban_reason, delete_message_days=0)
Получаю ошибку синтаксиса.
Без звёздочки получаю ошибку:
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "E:\Python\new\lib\site-packages\discord\ext\commands\bot.py", line 939, in invoke
await ctx.command.invoke(ctx)
File "E:\Python\new\lib\site-packages\discord\ext\commands\core.py", line 863, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "E:\Python\new\lib\site-packages\discord\ext\commands\core.py", line 94, in wrapped
raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: TypeError: ban() got an unexpected keyword argument 'reason'
Что делать?