Discord.py: How to reply a Direct Message?

Created on 2 Oct 2018  路  2Comments  路  Source: Rapptz/discord.py

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.

question

Most helpful comment

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.

All 2 comments

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Yolotroll101 picture Yolotroll101  路  3Comments

ghost picture ghost  路  3Comments

reuscam picture reuscam  路  3Comments

tairabiteru picture tairabiteru  路  3Comments

adhoc92 picture adhoc92  路  3Comments