python discord message code example
Example 1: send message discord.py
await message.channel.send("Your message")
Example 2: on message discord py
@bot.event
async def on_message(message):
if message.content == "pong":
await message.channel.send('ping')
Example 3: discord.py fetch channel
await client.fetch_channel(channelId)
Example 4: python discord know message from bot
def on_message(self, message):
if (message.author.bot):
return #if this is true: then it is by a bot.