Skip to content

Commit 2f1bb09

Browse files
committed
add conditional for old message on messageUpdate
Signed-off-by: Akhil Pillai <[email protected]>
1 parent 1b1830b commit 2f1bb09

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/events/messageUpdate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ async function sendError(client: Client, e: Error) {
8282
.addFields({ name: 'Stack Trace', value: codeBlock(e.stack ?? '') })
8383
.addFields({
8484
name: 'Old Message',
85-
value: codeBlock(JSON.stringify(old, undefined, 2))
85+
value: codeBlock(old ? JSON.stringify(old, undefined, 2) : 'undefined')
8686
})
8787
.addFields({
8888
name: 'New Message',

0 commit comments

Comments
 (0)