mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-18 04:23:31 +01:00
feat: rest hash and handler sweeping (#7255)
Co-authored-by: SpaceEEC <spaceeec@yahoo.com> Co-authored-by: Antonio Román <kyradiscord@gmail.com> Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
This commit is contained in:
@@ -19,6 +19,9 @@ export const DefaultRestOptions: Required<RESTOptions> = {
|
||||
timeout: 15_000,
|
||||
userAgentAppendix: `Node.js ${process.version}`,
|
||||
version: APIVersion,
|
||||
hashSweepInterval: 14_400_000, // 4 Hours
|
||||
hashLifetime: 86_400_000, // 24 Hours
|
||||
handlerSweepInterval: 3_600_000, // 1 Hour
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -30,6 +33,8 @@ export const enum RESTEvents {
|
||||
RateLimited = 'rateLimited',
|
||||
Request = 'request',
|
||||
Response = 'response',
|
||||
HashSweep = 'hashSweep',
|
||||
HandlerSweep = 'handlerSweep',
|
||||
}
|
||||
|
||||
export const ALLOWED_EXTENSIONS = ['webp', 'png', 'jpg', 'jpeg', 'gif'] as const;
|
||||
|
||||
Reference in New Issue
Block a user