I am writing a Discord bot using Python (v. 3.6.1). One of its functions detects all messages sent in a channel, processes them, and then responds to the messages in said channel. (At least, that's what I want it to do.)
I have tried this:
@bot.event
async def on_message(message):
await bot.say(message.content)
The function responds when a message is sent, but not in the way that I want it to. I instead get an error:
discord.errors.InvalidArgument: Destination must be Channel, PrivateChannel, User, or Object. Received NoneType
How would I fix this? Many thanks!