Fix awaitMessages (#1493)

This commit is contained in:
Daniel Odendahl
2017-05-14 19:04:57 -04:00
committed by Crawl
parent a579967eb9
commit 88444cdd26

View File

@@ -339,7 +339,7 @@ class TextBasedChannel {
*/
awaitMessages(filter, options = {}) {
return new Promise((resolve, reject) => {
const collector = this.createCollector(filter, options);
const collector = this.createMessageCollector(filter, options);
collector.once('end', (collection, reason) => {
if (options.errors && options.errors.includes(reason)) {
reject(collection);