fix: 🚑 fix bot crash if oldMessage content undefined
Added an if statement to return if oldMessage.content is undefined
This commit is contained in:
parent
9bf5603fb5
commit
6f932d9fb9
1 changed files with 3 additions and 0 deletions
|
@ -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",
|
||||
|
|
Loading…
Add table
Reference in a new issue