From 00ae8bb18c7eeb55d1ebd96aa523b265d66ec0f1 Mon Sep 17 00:00:00 2001 From: Gnome! <45660393+Gnome-py@users.noreply.github.com> Date: Mon, 20 Sep 2021 20:25:48 +0100 Subject: [PATCH 1/2] Fix all invites to devision server invite (#69) --- .github/ISSUE_TEMPLATE/bug_report.yml | 2 +- .github/ISSUE_TEMPLATE/config.yml | 2 +- README.rst | 4 ++-- docs/conf.py | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index eabf5c07..d163d40d 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -6,7 +6,7 @@ body: attributes: value: > Thanks for taking the time to fill out a bug. - If you want real-time support, consider joining our Discord at https://discord.gg/r3sSKJJ instead. + If you want real-time support, consider joining our Discord at https://discord.gg/TvqYBrGXEm instead. Please note that this form is for bugs only! - type: input diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 7934e4a8..8d62a0e1 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -5,4 +5,4 @@ contact_links: url: https://github.com/Rapptz/discord.py/discussions - name: Discord Server about: Use our official Discord server to ask for help and questions as well. - url: https://discord.gg/r3sSKJJ + url: https://discord.gg/TvqYBrGXEm diff --git a/README.rst b/README.rst index 9f222e10..1c956bdc 100644 --- a/README.rst +++ b/README.rst @@ -2,7 +2,7 @@ enhanced-discord.py =================== .. image:: https://discord.com/api/guilds/514232441498763279/embed.png - :target: https://discord.gg/PYAfZzpsjG + :target: https://discord.gg/TvqYBrGXEm :alt: Discord server invite .. image:: https://img.shields.io/pypi/v/enhanced-dpy.svg :target: https://pypi.python.org/pypi/enhanced-dpy @@ -117,5 +117,5 @@ Links ------ - `Documentation `_ -- `Official Discord Server `_ +- `Official Discord Server `_ - `Discord API `_ diff --git a/docs/conf.py b/docs/conf.py index e0878cd2..e6464b4a 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -159,7 +159,7 @@ html_experimental_html5_writer = True html_theme = "basic" html_context = { - "discord_invite": "https://discord.gg/r3sSKJJ", + "discord_invite": "https://discord.gg/TvqYBrGXEm", "discord_extensions": [ ("discord.ext.commands", "ext/commands"), ("discord.ext.tasks", "ext/tasks"), @@ -167,7 +167,7 @@ html_context = { } resource_links = { - "discord": "https://discord.gg/r3sSKJJ", + "discord": "https://discord.gg/TvqYBrGXEm", "issues": "https://github.com/Rapptz/discord.py/issues", "discussions": "https://github.com/Rapptz/discord.py/discussions", "examples": f"https://github.com/Rapptz/discord.py/tree/{branch}/examples", -- 2.47.2 From b0b960a10e9175e899c910c2c8571c377da124a4 Mon Sep 17 00:00:00 2001 From: Gnome Date: Tue, 21 Sep 2021 17:00:41 +0100 Subject: [PATCH 2/2] Fix embed image/thumbnail property --- discord/embeds.py | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/discord/embeds.py b/discord/embeds.py index 4e1647f1..81f7e5ff 100644 --- a/discord/embeds.py +++ b/discord/embeds.py @@ -398,16 +398,14 @@ class Embed: return EmbedProxy(getattr(self, "_image", {})) # type: ignore @image.setter - def image(self: E, url: Any): + def image(self, url: Any): if url is EmptyEmbed: - del self._image + del self.image else: - self._image = { - "url": str(url), - } + self._image = {"url": str(url)} @image.deleter - def image(self: E): + def image(self): try: del self._image except AttributeError: @@ -429,7 +427,6 @@ class Embed: """ self.image = url - return self @property @@ -448,13 +445,11 @@ class Embed: return EmbedProxy(getattr(self, "_thumbnail", {})) # type: ignore @thumbnail.setter - def thumbnail(self: E, url: Any): + def thumbnail(self, url: Any): if url is EmptyEmbed: - del self._thumbnail + del self.thumbnail else: - self._thumbnail = { - "url": str(url), - } + self._thumbnail = {"url": str(url)} @thumbnail.deleter def thumbnail(self): @@ -463,7 +458,7 @@ class Embed: except AttributeError: pass - def set_thumbnail(self: E, *, url: MaybeEmpty[Any]): + def set_thumbnail(self, *, url: MaybeEmpty[Any]): """Sets the thumbnail for the embed content. This function returns the class instance to allow for fluent-style @@ -479,7 +474,6 @@ class Embed: """ self.thumbnail = url - return self @property -- 2.47.2