perf: tune selfbot runtime defaults
Apply low-memory client options and point the workspace vendor package at the optimized selfbot internals for more stable long-running moderation capture. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
21
src/discordClientOptions.ts
Normal file
21
src/discordClientOptions.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { type ClientOptions, Options } from "discord.js-selfbot-v13";
|
||||
|
||||
export function createDiscordClientOptions(): ClientOptions {
|
||||
return {
|
||||
makeCache: Options.cacheWithLimits({
|
||||
...Options.defaultMakeCacheSettings,
|
||||
MessageManager: 25,
|
||||
ReactionManager: 0,
|
||||
ReactionUserManager: 0,
|
||||
PresenceManager: 0,
|
||||
}),
|
||||
partials: ["USER", "CHANNEL", "GUILD_MEMBER", "MESSAGE"],
|
||||
sweepers: {
|
||||
messages: { interval: 300, lifetime: 600 },
|
||||
threads: { interval: 3600, lifetime: 14400 },
|
||||
},
|
||||
restRequestTimeout: 15_000,
|
||||
retryLimit: 2,
|
||||
restGlobalRateLimit: 45,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user