discord.js-self
Version:
A fork of discord.js with support of user accounts
25 lines (20 loc) • 566 B
JavaScript
;
const Action = require('./Action');
class MessageUpdateAction extends Action {
handle(data) {
const channel = this.getChannel(data);
if (channel) {
const { id, channel_id, guild_id, author, timestamp, type } = data;
const message = this.getMessage({ id, channel_id, guild_id, author, timestamp, type }, channel);
if (message) {
message.patch(data);
return {
old: message._edits[0],
updated: message,
};
}
}
return {};
}
}
module.exports = MessageUpdateAction;