mirror of
https://github.com/danbulant/discord.js
synced 2026-06-09 17:52:55 +00:00
Fix awaitMessages (#1493)
This commit is contained in:
parent
a579967eb9
commit
88444cdd26
1 changed files with 1 additions and 1 deletions
|
|
@ -339,7 +339,7 @@ class TextBasedChannel {
|
||||||
*/
|
*/
|
||||||
awaitMessages(filter, options = {}) {
|
awaitMessages(filter, options = {}) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
const collector = this.createCollector(filter, options);
|
const collector = this.createMessageCollector(filter, options);
|
||||||
collector.once('end', (collection, reason) => {
|
collector.once('end', (collection, reason) => {
|
||||||
if (options.errors && options.errors.includes(reason)) {
|
if (options.errors && options.errors.includes(reason)) {
|
||||||
reject(collection);
|
reject(collection);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue