From 46babe822a11ba482be864f687d2bcef66c19005 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Tue, 14 Jun 2016 20:15:50 -0400 Subject: [PATCH] Fix bug with editing messages over private messages. --- discord/client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/discord/client.py b/discord/client.py index a62b37a86..9139a3ea2 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):