Get user discriminator correctly

This commit is contained in:
SeanOMik 2020-06-17 22:16:21 -05:00
parent 9a6bed2992
commit ac325ead99
No known key found for this signature in database
GPG Key ID: FA4D55AC05268A88
1 changed files with 1 additions and 1 deletions

View File

@ -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(),