use discord-server-util
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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 = "/" }) {
|
||||
|
||||
Reference in New Issue
Block a user