From 05d72ac3ac0c8d887942c783a2c93a1ad7a34d1b Mon Sep 17 00:00:00 2001 From: Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> Date: Tue, 24 Aug 2021 16:35:59 +0200 Subject: :sparkles: util --- util/oldModels/RateLimit.ts | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 util/oldModels/RateLimit.ts (limited to 'util/oldModels/RateLimit.ts') diff --git a/util/oldModels/RateLimit.ts b/util/oldModels/RateLimit.ts deleted file mode 100644 index 6a0e1ffd..00000000 --- a/util/oldModels/RateLimit.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { Schema, Document, Types } from "mongoose"; -import db from "../util/Database"; - -export interface Bucket { - id: "global" | "error" | string; // channel_239842397 | guild_238927349823 | webhook_238923423498 - user_id: string; - hits: number; - blocked: boolean; - expires_at: Date; -} - -export interface BucketDocument extends Bucket, Document { - id: string; -} - -export const BucketSchema = new Schema({ - id: { type: String, required: true }, - 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 }, - expires_at: { type: Date, required: true }, -}); - -// @ts-ignore -export const BucketModel = db.model("Bucket", BucketSchema, "ratelimits"); -- cgit 1.5.1