Python 3.x 对python来说是绿色的,存在不一致嵌入问题

Python 3.x 对python来说是绿色的,存在不一致嵌入问题,python-3.x,discord,discord.py,Python 3.x,Discord,Discord.py,因此,继续获取一个类型错误,声明send()得到了一个意外的关键字参数“Embed” 我不确定我做错了什么。任何帮助都会很棒 client = discord.Client() @client.event async def on_message(message): if message.content == 'what is the version': dev_channel = client.get_channel(Deleted for obs reasons)

因此,继续获取一个类型错误,声明send()得到了一个意外的关键字参数“Embed” 我不确定我做错了什么。任何帮助都会很棒

client = discord.Client()

@client.event
async def on_message(message):
    if message.content == 'what is the version':
        dev_channel = client.get_channel(Deleted for obs reasons)

        myEmbed = discord.Embed(title="Current Version", description="The bot 
        is in Version 1.0", color=0x00ff00)
        
        myEmbed.add_field(name="Version Code:", value="v1.0.0", inline=False)
        
        myEmbed.add_field(name="Date Released:", value="November 25th, 2020", 
        inline=False)

        myEmbed.set_footer(text="End of message")

        await dev_channel.send(Embed=myEmbed)
当我在discord文本频道中键入版本时,Visual Studio在终端中提供以下文本

Ignoring exception in on_message
Traceback (most recent call last):                                                               
", line 333, in _run_event
File "C:\Users\lazy5\AppData\Local\Programs\Python\Python39\lib\site- 
packages\discord\client.pyy", line 333, in _run_event
await coro(*args, **kwargs)
File "c:\Users\lazy5\Desktop\worth.py", line 30, in on_message
await dev_channel.send(Embed=myEmbed)
TypeError: send() got an unexpected keyword argument 'Embed'
在你的发送线上

await dev_channel.send(Embed=myEmbed)
“Embed=”应为小写,如下所示:

await dev_channel.send(embed=myEmbed)

我也改变了,没有改变。我觉得好像它没有从discord中提取嵌入模块。@RWT98我已经用修复程序测试了您的代码。你能把你修改过的代码发过来吗?所以我已经尝试了很多东西,试图自己解决它,但这里没有运气,这是我得到的错误截图。该机器人上线,并将保持在线,直到我在聊天中键入“什么是版本”。我开始觉得有些东西安装不正确?感谢您花时间提供帮助。@RWT98答案仍然正确。你改变了密码。将第11行中嵌入的“e”大写,然后再次运行。感谢所有帮助。我最终发现这就是问题所在,但不久之后,进口熊猫开始出现更多问题。我最终从3.9改到了3.8,从那以后一切都很顺利。再次感谢您抽出时间来帮忙!