use discord-server-util

This commit is contained in:
Flam3rboy
2021-02-05 17:47:44 +01:00
parent 7058118de6
commit c53d6628f7
3 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
import { NextFunction, Request, Response } from "express";
import Config from "../util/Config";
import db from "../util/Database";
import { db } from "discord-server-util";
export async function GlobalRateLimit(req: Request, res: Response, next: NextFunction) {
if (!Config.get().limits.rate.ip.enabled) return next();
+2 -1
View File
@@ -1,5 +1,6 @@
import { NextFunction, Request, Response } from "express";
import db from "../util/Database";
import { db } from "discord-server-util";
import { getIpAdress } from "./GlobalRateLimit";
export function RateLimit({ count = 10, timespan = 1000 * 5, name = "/" }) {