File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 25
25
from __future__ import annotations
26
26
27
27
from typing import TYPE_CHECKING , Any
28
+ from functools import cached_property
28
29
29
30
from .enums import OnboardingMode , PromptType , try_enum
30
31
from .partial_emoji import PartialEmoji
@@ -247,7 +248,7 @@ def _update(self, data: OnboardingPayload):
247
248
self .enabled : bool = data ["enabled" ]
248
249
self .mode : OnboardingMode = try_enum (OnboardingMode , data .get ("mode" ))
249
250
250
- @property
251
+ @cached_property
251
252
def default_channels (
252
253
self ,
253
254
) -> list [TextChannel | ForumChannel | VoiceChannel | Object ]:
Original file line number Diff line number Diff line change 26
26
27
27
import datetime
28
28
from typing import TYPE_CHECKING , Any
29
+ from functools import cached_property
29
30
30
31
from . import utils
31
32
from .enums import PollLayoutType , try_enum
@@ -358,7 +359,7 @@ def __init__(
358
359
self ._expiry = None
359
360
self ._message = None
360
361
361
- @property
362
+ @cached_property
362
363
def expiry (self ) -> datetime .datetime | None :
363
364
"""An aware datetime object that specifies the date and time in UTC when the poll will end."""
364
365
return utils .parse_time (self ._expiry )
You can’t perform that action at this time.
0 commit comments