Clean up a bunch of promise stuff

This commit is contained in:
Schuyler Cebulskie
2016-10-30 12:47:09 -04:00
parent c42e7a15aa
commit 8306d50bd8
12 changed files with 112 additions and 161 deletions

View File

@@ -97,8 +97,8 @@ class TextBasedChannel {
this.client.rest.methods.sendMessage(this, content, options, {
file,
name: fileName,
}).then(resolve).catch(reject);
}).catch(reject);
}).then(resolve, reject);
}, reject);
});
}
@@ -138,7 +138,7 @@ class TextBasedChannel {
this._cacheMessage(msg);
resolve(msg);
}).catch(reject);
}, reject);
});
}
@@ -172,7 +172,7 @@ class TextBasedChannel {
this._cacheMessage(msg);
}
resolve(messages);
}).catch(reject);
}, reject);
});
}
@@ -190,7 +190,7 @@ class TextBasedChannel {
this._cacheMessage(msg);
}
resolve(messages);
}).catch(reject);
}, reject);
});
}