Downgrade to v13
[vi] cảm giác đau khổ
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
const { Collection } = require('@discordjs/collection');
|
||||
const Collector = require('./interfaces/Collector');
|
||||
const Events = require('../util/Events');
|
||||
const { Events } = require('../util/Constants');
|
||||
|
||||
/**
|
||||
* @typedef {CollectorOptions} ReactionCollectorOptions
|
||||
@@ -57,24 +57,24 @@ class ReactionCollector extends Collector {
|
||||
};
|
||||
|
||||
this.client.incrementMaxListeners();
|
||||
this.client.on(Events.MessageReactionAdd, this.handleCollect);
|
||||
this.client.on(Events.MessageReactionRemove, this.handleDispose);
|
||||
this.client.on(Events.MessageReactionRemoveAll, this.empty);
|
||||
this.client.on(Events.MessageDelete, this._handleMessageDeletion);
|
||||
this.client.on(Events.MessageBulkDelete, bulkDeleteListener);
|
||||
this.client.on(Events.ChannelDelete, this._handleChannelDeletion);
|
||||
this.client.on(Events.ThreadDelete, this._handleThreadDeletion);
|
||||
this.client.on(Events.GuildDelete, this._handleGuildDeletion);
|
||||
this.client.on(Events.MESSAGE_REACTION_ADD, this.handleCollect);
|
||||
this.client.on(Events.MESSAGE_REACTION_REMOVE, this.handleDispose);
|
||||
this.client.on(Events.MESSAGE_REACTION_REMOVE_ALL, this.empty);
|
||||
this.client.on(Events.MESSAGE_DELETE, this._handleMessageDeletion);
|
||||
this.client.on(Events.MESSAGE_BULK_DELETE, bulkDeleteListener);
|
||||
this.client.on(Events.CHANNEL_DELETE, this._handleChannelDeletion);
|
||||
this.client.on(Events.THREAD_DELETE, this._handleThreadDeletion);
|
||||
this.client.on(Events.GUILD_DELETE, this._handleGuildDeletion);
|
||||
|
||||
this.once('end', () => {
|
||||
this.client.removeListener(Events.MessageReactionAdd, this.handleCollect);
|
||||
this.client.removeListener(Events.MessageReactionRemove, this.handleDispose);
|
||||
this.client.removeListener(Events.MessageReactionRemoveAll, this.empty);
|
||||
this.client.removeListener(Events.MessageDelete, this._handleMessageDeletion);
|
||||
this.client.removeListener(Events.MessageBulkDelete, bulkDeleteListener);
|
||||
this.client.removeListener(Events.ChannelDelete, this._handleChannelDeletion);
|
||||
this.client.removeListener(Events.ThreadDelete, this._handleThreadDeletion);
|
||||
this.client.removeListener(Events.GuildDelete, this._handleGuildDeletion);
|
||||
this.client.removeListener(Events.MESSAGE_REACTION_ADD, this.handleCollect);
|
||||
this.client.removeListener(Events.MESSAGE_REACTION_REMOVE, this.handleDispose);
|
||||
this.client.removeListener(Events.MESSAGE_REACTION_REMOVE_ALL, this.empty);
|
||||
this.client.removeListener(Events.MESSAGE_DELETE, this._handleMessageDeletion);
|
||||
this.client.removeListener(Events.MESSAGE_BULK_DELETE, bulkDeleteListener);
|
||||
this.client.removeListener(Events.CHANNEL_DELETE, this._handleChannelDeletion);
|
||||
this.client.removeListener(Events.THREAD_DELETE, this._handleThreadDeletion);
|
||||
this.client.removeListener(Events.GUILD_DELETE, this._handleGuildDeletion);
|
||||
this.client.decrementMaxListeners();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user