summary refs log tree commit diff
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-06-30 17:49:19 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-06-30 17:49:19 +0200
commite13bdc31272f382773a65508ab7bb5626d1c535e (patch)
tree10feb07675d28b2c59dbdfbd3c492fe85cdefb66
parent:sparkles: Rate Limit model (diff)
downloadserver-e13bdc31272f382773a65508ab7bb5626d1c535e.tar.xz
:sparkles: RateLimit Bucket
-rw-r--r--src/models/RateLimit.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/models/RateLimit.ts b/src/models/RateLimit.ts
index 7e4ca3cc..6ccfafe0 100644
--- a/src/models/RateLimit.ts
+++ b/src/models/RateLimit.ts
@@ -9,6 +9,7 @@ export interface Bucket {
 	user: string;
 	hits: number;
 	blocked: boolean;
+	created_at: Date;
 }
 
 export interface BucketDocument extends Bucket, Document {
@@ -20,6 +21,7 @@ export const BucketSchema = new Schema({
 	user_id: { type: String, required: true }, // bot, user, oauth_application, webhook
 	hits: { type: Number, required: true }, // Number of times the user hit this bucket
 	blocked: { type: Boolean, required: true },
+	created_at: { type: Date, required: true },
 });
 
 // @ts-ignore