aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRapptz <[email protected]>2016-06-14 20:15:50 -0400
committerRapptz <[email protected]>2016-06-14 22:26:13 -0400
commit46babe822a11ba482be864f687d2bcef66c19005 (patch)
tree8efa67eb5033a89573717fcd43e44e0b136c5839
parentAdd discord.PermissionOverwrite type for channel-specific overwrites. (diff)
downloaddiscord.py-46babe822a11ba482be864f687d2bcef66c19005.tar.xz
discord.py-46babe822a11ba482be864f687d2bcef66c19005.zip
Fix bug with editing messages over private messages.
-rw-r--r--discord/client.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/discord/client.py b/discord/client.py
index a62b37a8..9139a3ea 100644
--- a/discord/client.py
+++ b/discord/client.py
@@ -1070,8 +1070,8 @@ class Client:
channel = message.channel
content = str(new_content)
-
- data = yield from self.http.edit_message(message.id, channel.id, content, guild_id=channel.server.id)
+ guild_id = channel.server.id if not channel.is_private else None
+ data = yield from self.http.edit_message(message.id, channel.id, content, guild_id=guild_id)
return Message(channel=channel, **data)
def _logs_from(self, channel, limit=100, before=None, after=None):