discord.js-selfbot-v13/src/client/websocket/handlers/MESSAGE_UPDATE.js

17 lines
518 B
JavaScript
Raw Normal View History

2022-03-19 10:37:45 +00:00
'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);
}
};