Skip to content

Commit 2b57461

Browse files
authored
fix: change badge property to cached_property (#2891)
Signed-off-by: Lala Sabathil <[email protected]>
1 parent 2cf71df commit 2b57461

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

discord/primary_guild.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
DEALINGS IN THE SOFTWARE.
2323
"""
2424

25+
from functools import cached_property
2526
from typing import TYPE_CHECKING
2627

2728
if TYPE_CHECKING:
@@ -61,7 +62,7 @@ def __init__(self, data: PrimaryGuildPayload, state: "ConnectionState") -> None:
6162
def __repr__(self) -> str:
6263
return f"<PrimaryGuild identity_guild_id={self.identity_guild_id} identity_enabled={self.identity_enabled} tag={self.tag}>"
6364

64-
@property
65+
@cached_property
6566
def badge(self) -> Asset | None:
6667
"""Returns the badge asset, if available.
6768

0 commit comments

Comments
 (0)