WIP: Refactor Aurora (3.0.0) #29
1 changed files with 2 additions and 1 deletions
|
@ -5,6 +5,7 @@ from discord import Forbidden, HTTPException, InvalidData, NotFound
|
||||||
from pydantic import BaseModel, ConfigDict
|
from pydantic import BaseModel, ConfigDict
|
||||||
from redbot.core.bot import Red
|
from redbot.core.bot import Red
|
||||||
|
|
||||||
|
from aurora.utilities.json import dumps
|
||||||
from aurora.utilities.utils import generate_dict
|
from aurora.utilities.utils import generate_dict
|
||||||
|
|
||||||
|
|
||||||
|
@ -84,7 +85,7 @@ class Moderation(AuroraGuildModel):
|
||||||
|
|
||||||
with connect() as database:
|
with connect() as database:
|
||||||
cursor = database.cursor()
|
cursor = database.cursor()
|
||||||
cursor.execute(query, (self.timestamp, self.moderation_type, self.target_type, self.moderator_id, self.role_id, self.duration, self.end_timestamp, self.reason, self.resolved, self.resolved_by, self.resolve_reason, self.expired, changes, self.metadata, self.moderation_id))
|
cursor.execute(query, (self.timestamp, self.moderation_type, self.target_type, self.moderator_id, self.role_id, self.duration, self.end_timestamp, self.reason, self.resolved, self.resolved_by, self.resolve_reason, self.expired, dumps(changes), dumps(self.metadata), self.moderation_id))
|
||||||
cursor.close()
|
cursor.close()
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|
Loading…
Reference in a new issue