我已经安装了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
你需要告诉智能感知消息参数是什么类型的,这样它可以做自动完成。
您可以通过执行以下操作做到这一点
async def on_message(message:Type):