mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-15 02:53:31 +01:00
feat(Client): add global sweepers (#6825)
Co-authored-by: Antonio Román <kyradiscord@gmail.com> Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com> Co-authored-by: Rodry <38259440+ImRodry@users.noreply.github.com> Co-authored-by: Almeida <almeidx@pm.me>
This commit is contained in:
@@ -188,6 +188,7 @@ exports.Events = {
|
||||
ERROR: 'error',
|
||||
WARN: 'warn',
|
||||
DEBUG: 'debug',
|
||||
CACHE_SWEEP: 'cacheSweep',
|
||||
SHARD_DISCONNECT: 'shardDisconnect',
|
||||
SHARD_ERROR: 'shardError',
|
||||
SHARD_RECONNECTING: 'shardReconnecting',
|
||||
@@ -431,6 +432,41 @@ exports.MessageTypes = [
|
||||
'CONTEXT_MENU_COMMAND',
|
||||
];
|
||||
|
||||
/**
|
||||
* The name of an item to be swept in Sweepers
|
||||
* * `applicationCommands` - both global and guild commands
|
||||
* * `bans`
|
||||
* * `emojis`
|
||||
* * `invites` - accepts the `lifetime` property, using it will sweep based on expires timestamp
|
||||
* * `guildMembers`
|
||||
* * `messages` - accepts the `lifetime` property, using it will sweep based on edited or created timestamp
|
||||
* * `presences`
|
||||
* * `reactions`
|
||||
* * `stageInstances`
|
||||
* * `stickers`
|
||||
* * `threadMembers`
|
||||
* * `threads` - accepts the `lifetime` property, using it will sweep archived threads based on archived timestamp
|
||||
* * `users`
|
||||
* * `voiceStates`
|
||||
* @typedef {string} SweeperKey
|
||||
*/
|
||||
exports.SweeperKeys = [
|
||||
'applicationCommands',
|
||||
'bans',
|
||||
'emojis',
|
||||
'invites',
|
||||
'guildMembers',
|
||||
'messages',
|
||||
'presences',
|
||||
'reactions',
|
||||
'stageInstances',
|
||||
'stickers',
|
||||
'threadMembers',
|
||||
'threads',
|
||||
'users',
|
||||
'voiceStates',
|
||||
];
|
||||
|
||||
/**
|
||||
* The types of messages that are `System`. The available types are `MessageTypes` excluding:
|
||||
* * DEFAULT
|
||||
|
||||
Reference in New Issue
Block a user