Skip to content

Commit bc1c427

Browse files
authored
Merge branch 'master' into feat/audit-log-timeout-time
Signed-off-by: Lala Sabathil <[email protected]>
2 parents dc8427a + 54ca771 commit bc1c427

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
@@ -142,6 +142,8 @@ These changes are available on the `master` branch, but have not yet been releas
142142
([#2843](https://github.com/Pycord-Development/pycord/pull/2843))
143143
- Fixed `TypeError` when using `@option` with certain annotations and along with
144144
`channel_types`. ([#2835](https://github.com/Pycord-Development/pycord/pull/2835))
145+
- Fixed `AttributeError` when accessing `AuditLogEntry.changes` more than once.
146+
([#2882])(https://github.com/Pycord-Development/pycord/pull/2882))
145147

146148
### Changed
147149

discord/audit_logs.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
from __future__ import annotations
2727

2828
import datetime
29+
from functools import cached_property
2930
from typing import TYPE_CHECKING, Any, Callable, ClassVar, Generator, TypeVar
3031

3132
from . import enums, utils
@@ -644,7 +645,7 @@ def category(self) -> enums.AuditLogActionCategory:
644645
"""The category of the action, if applicable."""
645646
return self.action.category
646647

647-
@property
648+
@cached_property
648649
def changes(self) -> AuditLogChanges:
649650
"""The list of changes this entry has."""
650651
obj = AuditLogChanges(self, self._changes, state=self._state)

0 commit comments

Comments
 (0)