diff --git a/src/nim_censor_bot.nim b/src/nim_censor_bot.nim index 311de08..4b40265 100644 --- a/src/nim_censor_bot.nim +++ b/src/nim_censor_bot.nim @@ -7,6 +7,7 @@ type ftype*: string fhash*: string fileid*: string + time*: float caption*: string type @@ -27,7 +28,7 @@ func NewCensoredData*(ftype = ""; fhash = ""; fileid = ""; caption = ""): func NewBannedUsers*(userid = int64(0), bantime = 0.0, bantype = ""): BannedUsers = BannedUsers(userid: userid, bantime: bantime, bantype: bantype) -let dbConn* = sqlite.open("censordata.db", "", "", "") +let dbConn* = getDb() proc ManageRateLimit(): void= for i in RateLimiter.keys().toSeq():