discord.js-selfbot-v13/src/client/websocket/handlers/MESSAGE_UPDATE.js
2022-03-19 17:37:45 +07:00

17 lines
518 B
JavaScript

'use strict';
const Events = require('../../../util/Events');
module.exports = (client, packet) => {
const { old, updated } = client.actions.MessageUpdate.handle(packet.d);
if (old && updated) {
/**
* Emitted whenever a message is updated - e.g. embed or content change.
* @event Client#messageUpdate
* @param {Message} oldMessage The message before the update
* @param {Message} newMessage The message after the update
*/
client.emit(Events.MessageUpdate, old, updated);
}
};