As title says how do i know if a user sends the bot a direct message?
I can't find anything about detecting a direct message only initializing a direct message with someone from the API docs.
You can check to see if Message.channel is a PrivateChannel.
Or if it's a DMChannel on the rewrite branch.
For future questions like this, you should join either the official discord.py server or the Discord API server for help, as the README recommends.
message.guild/server will also be None in DMs
Most helpful comment
You can check to see if
Message.channelis aPrivateChannel.Or if it's a
DMChannelon the rewrite branch.For future questions like this, you should join either the official discord.py server or the Discord API server for help, as the README recommends.