我想用CogMeta在discord.ext.commands中创建一个自定义Cog类,但是当我做discord.ext.commands.CogMeta时会出错AttributeError: module 'discord.ext.commands' has no attribute 'CogMeta'。我是不是遗漏了什么?
发布于 2022-03-05 02:27:19
在检查问题中链接的文档时,查看版本master时,CogMeta类是discord.cog.CogMeta,而不是在stable版本上,在stable中,如您所假设的那样,它是discord.ext.commands.CogMeta。因此,您可能使用的是master版本,而不是stable版本。
链接到主版本:https://docs.pycord.dev/en/master/ext/commands/api.html#cogmeta
链接到稳定版本:https://docs.pycord.dev/en/stable/ext/commands/api.html#cogmeta
https://stackoverflow.com/questions/71358679
复制相似问题