Skip to content

Commit d02faeb

Browse files
committed
docs: handle optional author
1 parent 2469b57 commit d02faeb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/website/docs/guide/03-events/01-discordjs-events.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ const handler: EventHandler<'messageUpdate'> = (
111111
newMessage,
112112
) => {
113113
console.log(
114-
`Message from ${oldMessage.author.username} updated: ${oldMessage.content} -> ${newMessage.content}`,
114+
`Message from ${oldMessage.author?.username} updated: ${oldMessage.content} -> ${newMessage.content}`,
115115
);
116116
};
117117

0 commit comments

Comments
 (0)