如何在编写 python 代码时获得建议 (discord api)
How to get suggestions when writing python code (discord api)
我制作一个 discord 机器人是为了好玩,运行 遇到了一些不便。例如在这个函数中
@client.event
async def on_message(message):
当我写 message.
PyCharm 时(这在其他编辑器中有效吗?)不显示可用方法、属性等的建议。是否可以设置它以便例如,当我输入 message.
时会出现建议,例如 author
等
对于大多数内容,您需要大量查看文档https://discordpy.readthedocs.io/en/stable/
您的 message
示例列在此处 https://discordpy.readthedocs.io/en/stable/api.html?highlight=message#discord.Message
是的,但您可能需要为参数设置类型。
import discord
@client.event
async def on_message(message:Discord.message):
我制作一个 discord 机器人是为了好玩,运行 遇到了一些不便。例如在这个函数中
@client.event
async def on_message(message):
当我写 message.
PyCharm 时(这在其他编辑器中有效吗?)不显示可用方法、属性等的建议。是否可以设置它以便例如,当我输入 message.
时会出现建议,例如 author
等
对于大多数内容,您需要大量查看文档https://discordpy.readthedocs.io/en/stable/
您的 message
示例列在此处 https://discordpy.readthedocs.io/en/stable/api.html?highlight=message#discord.Message
是的,但您可能需要为参数设置类型。
import discord
@client.event
async def on_message(message:Discord.message):