VSCode不显示discord.py码建议

问题描述 投票:0回答:1

我已经安装了discord.py重写,我试图用vscode的代码,但IntelliSense不使用它。它使用numpy的时候,或者基本的Python模块工作得很好,但它并不适用于discord.py工作。

@client.event
async def on_message(message):
    # we do not want the bot to reply to itself
    if message.author == client.user:
        return
    message. # this shows no suggestions aside from other words in the code

这里有一个picture

python visual-studio-code intellisense discord discord.py
1个回答
0
投票

你需要告诉智能感知消息参数是什么类型的,这样它可以做自动完成。 您可以通过执行以下操作做到这一点 async def on_message(message:Type):

© www.soinside.com 2019 - 2024. All rights reserved.