2017-06-10 13 views
0

我有这样的代码:AttributeError的:模块“不和谐”有没有属性“嵌入”

embed=discord.Embed(title="Commands - Type '/help [command prefix]' for command info!", color=0xff0d13) 
embed.set_footer(text="!blacklist, !clean, !clear, !disconnect, !id, !joinserver, !listids, !np, !pause, !perms, !play, !pldump, !queue, !restart, !resume, !search, !setavatar, !setname, !setnick, !shuffle, !shutdown, !skip, !summon, !volume") 
await self.bot.say(embed=embed) 

,我不断收到此错误:

AttributeError: module 'discord' has no attribute 'Embed' 

但我不知道什么导致它;我已经尝试再次安装discord.py,但这仍然发生..是它与代码本身或其他事情?

+0

你可以发布你的完整程序吗?我感觉你错过了一些东西。 –

回答

0

您的问题很可能是由于您将该文件或其他文件命名为discord.py的路径中的某处。要修复它,只需将您的文件重命名为其他内容即可。也许run.py什么的?

相关问题