Skip to content

Commit e4946ec

Browse files
fix: 🐛 Fix None default role in user installed apps. (#2650)
* 🐛 Fix `None` default role in user installed apps. * 📝 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>
1 parent 63e1ab0 commit e4946ec

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ These changes are available on the `master` branch, but have not yet been releas
6060
([#2627](https://github.com/Pycord-Development/pycord/issues/2627))
6161
- Fixed `AttributeError` when sending polls with `PartialWebook`.
6262
([#2624](https://github.com/Pycord-Development/pycord/pull/2624))
63+
- Fixed `AttributeError` when accessing `Member.guild_permissions` for user installed
64+
apps. ([#2650](https://github.com/Pycord-Development/pycord/pull/2650))
6365

6466
### Changed
6567

discord/member.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,8 @@ def roles(self) -> list[Role]:
566566
role = g.get_role(role_id)
567567
if role:
568568
result.append(role)
569-
result.append(g.default_role)
569+
if g.default_role:
570+
result.append(g.default_role)
570571
result.sort()
571572
return result
572573

0 commit comments

Comments
 (0)