aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRapptz <[email protected]>2015-10-11 06:42:11 -0400
committerRapptz <[email protected]>2015-10-11 06:42:41 -0400
commit03d477edd834f98d2b12dcac251fb699c853206b (patch)
treeaf44b95aa398a8303fe098858d9fb09d3418888b
parentRemove get_channel from __getattr__ in Client. (diff)
downloaddiscord.py-03d477edd834f98d2b12dcac251fb699c853206b.tar.xz
discord.py-03d477edd834f98d2b12dcac251fb699c853206b.zip
edit_profile now returns True or False depending on success.
-rw-r--r--discord/client.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/discord/client.py b/discord/client.py
index 9a840725..b4c8b4eb 100644
--- a/discord/client.py
+++ b/discord/client.py
@@ -782,6 +782,7 @@ class Client(object):
:param new_password: The new password you wish to change to.
:param email: The new email you wish to change to.
:param username: The new username you wish to change to.
+ :returns: True if profile edit was successful, False otherwise.
"""
payload = {
@@ -802,8 +803,10 @@ class Client(object):
self.email = data['email']
self.headers['authorization'] = self.token
self.user = User(**data)
+ return True
else:
log.debug(request_logging_format.format(response=response, name='edit_profile'))
+ return False
def edit_channel(self, channel, **options):
"""Edits a :class:`Channel`.