mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-04 09:50:07 +00:00
rate limit cache cleaner
This commit is contained in:
@@ -10,6 +10,14 @@ export interface Rate_Limited_Path {
|
||||
reset_timestamp: number
|
||||
}
|
||||
|
||||
setInterval(() => {
|
||||
const now = Date.now()
|
||||
ratelimited_paths.forEach((value, key) => {
|
||||
if (value.reset_timestamp > now) return
|
||||
ratelimited_paths.delete(key)
|
||||
})
|
||||
}, 1000)
|
||||
|
||||
export const Request_Manager = {
|
||||
// Something off about using run_method with get breaks when using fetch
|
||||
get: async (url: string, body?: unknown) => {
|
||||
|
||||
Reference in New Issue
Block a user