Fix some small issues

This commit is contained in:
SeanOMik 2020-08-28 16:05:31 -05:00
parent 733b004fab
commit 31efb1f26d
No known key found for this signature in database
GPG Key ID: FA4D55AC05268A88
1 changed files with 3 additions and 4 deletions

View File

@ -246,7 +246,7 @@ proc updateClientPresence*(shard: Shard, presence: Presence) {.async.} =
# DiscordClient stored instances:
let clientInstances = newTable[uint8, DiscordClient]()
var nextInstanceId = 0
var nextInstanceId: uint8 = 0
proc getClientInstance*(instanceID: uint8): DiscordClient =
## Get a client instance with instance id. Mainly used internally.
@ -262,7 +262,6 @@ proc newDiscordClient*(tkn: string, commandPrefix: string, log: Log = newLog(ord
var cac: Cache
new(cac)
result = DiscordClient(token: tkn, cache: cac, commandPrefix: commandPrefix, log: log)
result = DiscordClient(token: tkn, cache: cac, commandPrefix: commandPrefix, instanceID: nextInstanceId)
result = DiscordClient(token: tkn, cache: cac, commandPrefix: commandPrefix, log: log, instanceID: nextInstanceId)
clientInstances.add(nextInstanceId, result)
nextInstanceId++
nextInstanceId = nextInstanceId + 1