Python 来自另一个函数的discord.py方法调用错误
我有这个函数Python 来自另一个函数的discord.py方法调用错误,python,python-3.x,discord,discord.py,Python,Python 3.x,Discord,Discord.py,我有这个函数async def profile(self,ctx,region,*,caller),我试图用wait self.profile(ctx,region,caller)从另一个函数调用它,它给出了一个错误: > Too many positional arguments for method callpylint Missing mandatory > keyword argument 'summoner' in method callpylint profile函数中
async def profile(self,ctx,region,*,caller)
,我试图用wait self.profile(ctx,region,caller)
从另一个函数调用它,它给出了一个错误:
> Too many positional arguments for method callpylint Missing mandatory
> keyword argument 'summoner' in method callpylint
profile函数中的“*”有问题。如何在不删除它的情况下使其工作?使用裸星(*)强制调用方使用命名参数。有关详细信息,请参阅此处的
按如下方式更新调用:
wait self.profile(ctx,region,caller=caller)
使用裸星(*)强制调用方使用命名参数。有关详细信息,请参阅此处的
按如下方式更新调用:
wait self.profile(ctx,区域,召唤者=召唤者)