首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Pycord CogMeta类不存在

Pycord CogMeta类不存在
EN

Stack Overflow用户
提问于 2022-03-05 01:05:03
回答 1查看 46关注 0票数 1

我想用CogMeta在discord.ext.commands中创建一个自定义Cog类,但是当我做discord.ext.commands.CogMeta时会出错AttributeError: module 'discord.ext.commands' has no attribute 'CogMeta'。我是不是遗漏了什么?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 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

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/71358679

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档