aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--discord/message.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/discord/message.py b/discord/message.py
index be0282fd..8601e3cd 100644
--- a/discord/message.py
+++ b/discord/message.py
@@ -62,6 +62,8 @@ class Message(object):
The :class:`Channel` that the message was sent from. Could be a :class:`PrivateChannel` if it's a private message.
In :issue:`very rare cases <21>` this could be a :class:`Object` instead.
+
+ For the sake of convenience, this :class:`Object` instance has an attribute ``is_private`` set to ``True``.
.. attribute:: server
The :class:`Server` that the message belongs to. If not applicable (i.e. a PM) then it's None instead.
@@ -157,7 +159,8 @@ class Message(object):
self.server = None
if self.channel is None:
if channel_id is not None:
- self.channel = Object(channel_id)
+ self.channel = Object(id=channel_id)
+ self.channel.is_private = True
return
if not self.channel.is_private: