diff options
| author | jack1142 <[email protected]> | 2020-05-06 11:09:19 +0200 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2020-05-23 21:47:25 -0400 |
| commit | a601cf43ab715d2e7f00b617071d5ccc1082b4ee (patch) | |
| tree | 1ac07862c6dc57f2e4f6ea8509682f5adfc47d2c | |
| parent | Prepare for the discord.com domain rename (diff) | |
| download | discord.py-a601cf43ab715d2e7f00b617071d5ccc1082b4ee.tar.xz discord.py-a601cf43ab715d2e7f00b617071d5ccc1082b4ee.zip | |
Allow clearing the author information in embeds.
| -rw-r--r-- | discord/embeds.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/discord/embeds.py b/discord/embeds.py index 8acf1e32..e02918ef 100644 --- a/discord/embeds.py +++ b/discord/embeds.py @@ -395,6 +395,21 @@ class Embed: 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. |