I am making a discord bot for fun and have run into some inconvenience. For example in this function
@client.event
async def on_message(message):
When I write message.
PyCharm (does this work in other editors?) doesn't show suggestions for available methods, properties, etc. Is it possible to set this up so that for example when I type message.
suggestions will come up, such as author
, etc.
CodePudding user response:
You'll need to look a lot at the documentation for most things https://discordpy.readthedocs.io/en/stable/
Your message
example is listed in here https://discordpy.readthedocs.io/en/stable/api.html?highlight=message#discord.Message
CodePudding user response:
Yes, but you may need to set a type to your parameter.
import discord
@client.event
async def on_message(message:Discord.message):