aboutsummaryrefslogtreecommitdiff
path: root/discord/http.py
diff options
context:
space:
mode:
authorRapptz <[email protected]>2017-01-29 20:31:54 -0500
committerRapptz <[email protected]>2017-01-29 20:32:24 -0500
commitb27fab09eb411dfdb51c3c43a81d51a4f5710adf (patch)
treea7e6962f9f8740c57c61b7e58e0cbd5ee54ac54c /discord/http.py
parentAdd missing int casts in many different events in the state. (diff)
downloaddiscord.py-b27fab09eb411dfdb51c3c43a81d51a4f5710adf.tar.xz
discord.py-b27fab09eb411dfdb51c3c43a81d51a4f5710adf.zip
Allow removing an embed in Message.edit
Diffstat (limited to 'discord/http.py')
-rw-r--r--discord/http.py12
1 files changed, 2 insertions, 10 deletions
diff --git a/discord/http.py b/discord/http.py
index 2750a792..e660f6cb 100644
--- a/discord/http.py
+++ b/discord/http.py
@@ -318,18 +318,10 @@ class HTTPClient:
return self.request(r, json=payload)
- def edit_message(self, message_id, channel_id, content, *, embed=None):
+ def edit_message(self, message_id, channel_id, **fields):
r = Route('PATCH', '/channels/{channel_id}/messages/{message_id}', channel_id=channel_id,
message_id=message_id)
- payload = {}
-
- if content:
- payload['content'] = content
-
- if embed:
- payload['embed'] = embed
-
- return self.request(r, json=payload)
+ return self.request(r, json=fields)
def add_reaction(self, message_id, channel_id, emoji):
r = Route('PUT', '/channels/{channel_id}/messages/{message_id}/reactions/{emoji}/@me',