WIP: Moderation type registry #26

Closed
cswimr wants to merge 146 commits from aurora-3rd-party into main
Showing only changes of commit c2e017339e - Show all commits

View file

@ -179,7 +179,7 @@ class Moderation(AuroraGuildModel):
return cls(bot=bot, **data) return cls(bot=bot, **data)
@classmethod @classmethod
def from_result(bot: Red, result: Iterable, guild_id: int) -> dict: def from_result(cls, bot: Red, result: Iterable, guild_id: int) -> dict:
if result[7] is not None: if result[7] is not None:
hours, minutes, seconds = map(int, result[7].split(':')) hours, minutes, seconds = map(int, result[7].split(':'))
duration = timedelta(hours=hours, minutes=minutes, seconds=seconds) duration = timedelta(hours=hours, minutes=minutes, seconds=seconds)