Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/348.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 属性错误:模块';不和谐';没有属性';嵌入';_Python_Discord_Discord.py - Fatal编程技术网

Python 属性错误:模块';不和谐';没有属性';嵌入';

Python 属性错误:模块';不和谐';没有属性';嵌入';,python,discord,discord.py,Python,Discord,Discord.py,我有以下代码: 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, !

我有以下代码:

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
,但这种情况仍然存在。。这与代码本身有关还是其他原因有关?

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

你能发布你的完整程序吗?我觉得你错过了什么。