mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-19 21:13:30 +01:00
Fix awaitMessages (#1493)
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user