Skip to content

Commit

Permalink
Allow clearing the author information in embeds.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jackenmen authored and Rapptz committed May 24, 2020
1 parent 66c6be5 commit a601cf4
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions discord/embeds.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,21 @@ def set_author(self, *, name, url=EmptyEmbed, icon_url=EmptyEmbed):

return self

def remove_author(self):
"""Clears embed's author information.
This function returns the class instance to allow for fluent-style
chaining.
.. versionadded:: 1.4
"""
try:
del self._author
except AttributeError:
pass

return self

@property
def fields(self):
"""Returns a :class:`list` of ``EmbedProxy`` denoting the field contents.
Expand Down

0 comments on commit a601cf4

Please sign in to comment.