2017-06-10 18 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什麼的?

相關問題