Add support for default_sort_order in ForumChannel

This commit is contained in:
Puncher
2023-03-05 23:30:23 +01:00
committed by GitHub
parent 60094b17a9
commit a1295868a6
6 changed files with 72 additions and 1 deletions

View File

@ -67,6 +67,7 @@ __all__ = (
'AutoModRuleEventType',
'AutoModRuleActionType',
'ForumLayoutType',
'ForumOrderType',
)
if TYPE_CHECKING:
@ -751,6 +752,11 @@ class ForumLayoutType(Enum):
gallery_view = 2
class ForumOrderType(Enum):
latest_activity = 0
creation_date = 1
def create_unknown_value(cls: Type[E], val: Any) -> E:
value_cls = cls._enum_value_cls_ # type: ignore # This is narrowed below
name = f'unknown_{val}'