fix: 🚑 fix bot crash if oldMessage content undefined

Added an if statement to return if oldMessage.content is undefined
This commit is contained in:
Axel Olausson Holtenäs 2022-12-25 03:12:02 +01:00
parent 9bf5603fb5
commit 6f932d9fb9

View file

@ -15,6 +15,9 @@ export default {
// Do not send audit log when an message contains an link and that links creates an embed
if (!newMessage.editedTimestamp) return;
// Do not send audit log if oldMessage content is not found
if (!oldMessage.content) return;
const embed = new EmbedBuilder()
.setAuthor({
name: "Message Updated",