AttributeError: module 'discord' has no at

2019-08-24 14:34发布

I have this code:

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)

and I keep getting this error:

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

But I don't know whats causing it; I have tried installing discord.py again but this still happens.. is it to do with the code itself or something else?

1条回答
仙女界的扛把子
2楼-- · 2019-08-24 14:57

Your problem is most likely cause by you naming that file or some other file somewhere in your path to discord.py. To fix it, just rename your file to something else. Maybe run.py or something?

查看更多
登录 后发表回答