|
|
@ -657,15 +657,13 @@ async function bulkDelete(message) { |
|
|
|
}).catch(console.error); |
|
|
|
} |
|
|
|
|
|
|
|
client.on('messageDelete', msg => { |
|
|
|
msg.channel.messages.fetch(msg.id) |
|
|
|
.then(message => { |
|
|
|
client.on('messageDelete', message => { |
|
|
|
const deleteEmbed = new Discord.MessageEmbed() |
|
|
|
.setTitle('Message Deleted') |
|
|
|
.setAuthor(message.author.tag, message.author.avatarURL()) |
|
|
|
.setURL(message.url) |
|
|
|
.addField('Author', message.author.tag) |
|
|
|
.addField('Message', message.content) |
|
|
|
.setAuthor(message.author ? message.author.tag : "Unknown", message.author ? message.author.avatarURL() : client.user.defaultAvatarURL) |
|
|
|
.addField('Author', message.author ? message.author.tag : "Message not cached") |
|
|
|
.addField('Message', message.content ? message.content : "Message not cached") |
|
|
|
.setThumbnail(message.author.avatarURL()) |
|
|
|
.setFooter("ID: " + message.id) |
|
|
|
.setTimestamp() |
|
|
@ -682,7 +680,6 @@ client.on('messageDelete', msg => { |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
client.on('messageDeleteBulk', messages => { |
|
|
@ -709,10 +706,8 @@ client.on('messageDeleteBulk', messages => { |
|
|
|
}); |
|
|
|
|
|
|
|
client.on('messageUpdate', (originalMessage, editedMessage) => { |
|
|
|
if (editedMessage.author) { |
|
|
|
if (editedMessage.author.bot) { |
|
|
|
return; |
|
|
|
} |
|
|
|
message.channel.messages.fetch(editedMessage.id) |
|
|
|
.then(editedMessage => { |
|
|
|
const editEmbed = new Discord.MessageEmbed() |
|
|
|
.setTitle("Message Edited") |
|
|
|
.setURL(editedMessage.url) |
|
|
@ -733,7 +728,7 @@ client.on('messageUpdate', (originalMessage, editedMessage) => { |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
client.on('channelCreate', channel => { |
|
|
|