misc(aurora): changed two typehints in aurora.utilities.utils and added other typehints
This commit is contained in:
parent
be253b668b
commit
bbe8b281d1
3 changed files with 7 additions and 7 deletions
|
@ -63,10 +63,10 @@ class Moderation(AuroraGuildModel):
|
|||
return await PartialRole.from_id(self.bot, self.guild_id, self.role_id)
|
||||
return None
|
||||
|
||||
def __str__(self):
|
||||
def __str__(self) -> str:
|
||||
return f"{self.moderation_type} {self.target_type} {self.target_id} {self.reason}"
|
||||
|
||||
async def resolve(self, resolved_by: int, reason: str):
|
||||
async def resolve(self, resolved_by: int, reason: str) -> None:
|
||||
if self.resolved:
|
||||
raise ValueError("Case is already resolved!")
|
||||
|
||||
|
@ -113,7 +113,7 @@ class Moderation(AuroraGuildModel):
|
|||
|
||||
self.update()
|
||||
|
||||
def update(self):
|
||||
def update(self) -> None:
|
||||
from ..utilities.database import connect
|
||||
from ..utilities.json import dumps
|
||||
query = f"UPDATE moderation_{self.guild_id} SET timestamp = ?, moderation_type = ?, target_type = ?, moderator_id = ?, role_id = ?, duration = ?, end_timestamp = ?, reason = ?, resolved = ?, resolved_by = ?, resolve_reason = ?, expired = ?, changes = ?, metadata = ? WHERE moderation_id = ?;"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue