mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 17:13:31 +01:00
Fixed DataStore, deprecation leftovers and a bit of Event Constants (#1841)
* Fixed leftover fetchThing and removed unused methods/error messages * Added resume event constant and used event constants wherever possible * Replaced mentions of removed method name with their new name. * Fixed typo: resume -> resumed
This commit is contained in:
@@ -365,7 +365,7 @@ class Client extends EventEmitter {
|
||||
throw new TypeError('CLIENT_INVALID_OPTION', 'Lifetime', 'a number');
|
||||
}
|
||||
if (lifetime <= 0) {
|
||||
this.emit('debug', 'Didn\'t sweep messages - lifetime is unlimited');
|
||||
this.emit(Constants.Events.DEBUG, 'Didn\'t sweep messages - lifetime is unlimited');
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -386,7 +386,8 @@ class Client extends EventEmitter {
|
||||
}
|
||||
}
|
||||
|
||||
this.emit('debug', `Swept ${messages} messages older than ${lifetime} seconds in ${channels} text-based channels`);
|
||||
this.emit(Constants.Events.DEBUG,
|
||||
`Swept ${messages} messages older than ${lifetime} seconds in ${channels} text-based channels`);
|
||||
return messages;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user