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:
SpaceEEC
2017-08-28 00:11:28 +02:00
committed by Crawl
parent c4fecf6609
commit 65d9d46a3c
13 changed files with 22 additions and 32 deletions

View File

@@ -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;
}