mirror of
https://github.com/discordjs/discord.js.git
synced 2026-06-16 03:18:20 +00:00
refactor: make use of destructuring for Constants (#1942)
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
const AbstractHandler = require('./AbstractHandler');
|
||||
const Constants = require('../../../../util/Constants');
|
||||
const { Events } = require('../../../../util/Constants');
|
||||
|
||||
class ChannelUpdateHandler extends AbstractHandler {
|
||||
handle(packet) {
|
||||
const { old, updated } = this.packetManager.client.actions.ChannelUpdate.handle(packet.d);
|
||||
if (old && updated) {
|
||||
this.packetManager.client.emit(Constants.Events.CHANNEL_UPDATE, old, updated);
|
||||
this.packetManager.client.emit(Events.CHANNEL_UPDATE, old, updated);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user