WIP: Refactor Aurora (3.0.0) #29
1 changed files with 6 additions and 2 deletions
|
@ -53,10 +53,14 @@ class Change(AuroraBaseModel):
|
||||||
else:
|
else:
|
||||||
timestamp = data["timestamp"]
|
timestamp = data["timestamp"]
|
||||||
|
|
||||||
|
try:
|
||||||
|
data["user_id"] = int(data["user_id"])
|
||||||
|
except ValueError:
|
||||||
|
data["user_id"] = 0
|
||||||
|
|
||||||
data.update({
|
data.update({
|
||||||
"timestamp": timestamp,
|
"timestamp": timestamp,
|
||||||
"end_timestamp": end_timestamp,
|
"end_timestamp": end_timestamp,
|
||||||
"duration": duration,
|
"duration": duration
|
||||||
"user_id": int(data["user_id"])
|
|
||||||
})
|
})
|
||||||
return cls(bot=bot, **data)
|
return cls(bot=bot, **data)
|
||||||
|
|
Loading…
Reference in a new issue