【发布时间】:2022-12-18 22:05:51
【问题描述】:
到目前为止我有这个:
@app_commands.Argument(
username={
"min_length": 3,
"max_length": 22
}
)
async def inv(interaction:discord.Interaction, username:str):
# code
但它给了我这个错误:
Traceback (most recent call last):
File "main.py", line 69, in <module>
@app_commands.Argument(
TypeError: __init__() got an unexpected keyword argument 'username'
我该怎么做才能使 username 参数的最小和最大长度为 3 和 22。
【问题讨论】:
标签: python discord.py