Rename max_message_lifetime to message_cache_lifetime

This commit is contained in:
Schuyler Cebulskie
2016-09-19 17:52:11 -04:00
parent 6362c94f11
commit 9503990a86
3 changed files with 5 additions and 5 deletions

View File

@@ -252,9 +252,9 @@ class Client extends EventEmitter {
* If the message has been edited, the time of the edit is used rather than the time of the original message.
*/
sweepMessages() {
if (this.options.max_message_lifetime <= 0) return;
if (this.options.message_cache_lifetime <= 0) return;
const now = Date.now();
const lifetime = this.options.max_message_lifetime * 1000;
const lifetime = this.options.message_cache_lifetime * 1000;
for (const channel of this.channels.values()) {
if (!channel.messages) continue;
for (const message of channel.messages.values()) {