Get user discriminator correctly
This commit is contained in:
parent
9a6bed2992
commit
ac325ead99
|
@ -25,7 +25,7 @@ proc newUser*(user: JsonNode): User {.inline.} =
|
||||||
return User(
|
return User(
|
||||||
id: getIDFromJson(user["id"].getStr()),
|
id: getIDFromJson(user["id"].getStr()),
|
||||||
username: user["username"].getStr(),
|
username: user["username"].getStr(),
|
||||||
discriminator: cushort(user["discriminator"].getInt()),
|
discriminator: cushort(parseIntEasy(user["discriminator"].getStr())),
|
||||||
avatar: user["avatar"].getStr(),
|
avatar: user["avatar"].getStr(),
|
||||||
bot: user{"bot"}.getBool(),
|
bot: user{"bot"}.getBool(),
|
||||||
system: user{"system"}.getBool(),
|
system: user{"system"}.getBool(),
|
||||||
|
|
Reference in New Issue