From 63e1ab006050c9be6d7db4dade7e792d749bc6dd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Nov 2024 00:01:17 +0100 Subject: [PATCH 1/2] chore(deps): update setuptools requirement from <=75.4.0,>=62.6 to >=62.6,<=75.5.0 (#2648) chore(deps): update setuptools requirement Updates the requirements on [setuptools](https://github.com/pypa/setuptools) to permit the latest version. - [Release notes](https://github.com/pypa/setuptools/releases) - [Changelog](https://github.com/pypa/setuptools/blob/main/NEWS.rst) - [Commits](https://github.com/pypa/setuptools/compare/v72.2.0...v75.5.0) --- updated-dependencies: - dependency-name: setuptools dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3a6cebf270..9b9c93be52 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [build-system] requires = [ - "setuptools>=62.6,<=75.4.0", + "setuptools>=62.6,<=75.5.0", "setuptools-scm>=6.2,<=8.1.0", ] build-backend = "setuptools.build_meta" From e4946ecf5c52a1c2900beba45281b6d052444383 Mon Sep 17 00:00:00 2001 From: Paillat Date: Thu, 14 Nov 2024 20:22:31 +0100 Subject: [PATCH 2/2] fix: :bug: Fix `None` default role in user installed apps. (#2650) * :bug: Fix `None` default role in user installed apps. * :memo: CHANGELOG.md * style(pre-commit): auto fixes from pre-commit.com hooks --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- CHANGELOG.md | 2 ++ discord/member.py | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bc995ffd76..a9547fbafc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -60,6 +60,8 @@ These changes are available on the `master` branch, but have not yet been releas ([#2627](https://github.com/Pycord-Development/pycord/issues/2627)) - Fixed `AttributeError` when sending polls with `PartialWebook`. ([#2624](https://github.com/Pycord-Development/pycord/pull/2624)) +- Fixed `AttributeError` when accessing `Member.guild_permissions` for user installed + apps. ([#2650](https://github.com/Pycord-Development/pycord/pull/2650)) ### Changed diff --git a/discord/member.py b/discord/member.py index f1a546c918..0ff90cce04 100644 --- a/discord/member.py +++ b/discord/member.py @@ -566,7 +566,8 @@ def roles(self) -> list[Role]: role = g.get_role(role_id) if role: result.append(role) - result.append(g.default_role) + if g.default_role: + result.append(g.default_role) result.sort() return result