Skip to content
This repository has been archived by the owner on Oct 10, 2024. It is now read-only.

Commit

Permalink
fix: null asssertions
Browse files Browse the repository at this point in the history
  • Loading branch information
eddiejaoude committed May 15, 2024
1 parent 65b1a6c commit e14f59b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/events/onUpdate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,14 @@ export const onUpdate = async (
.setTitle(`Message Updated by "${newMessage.author?.username}"`)
.setDescription(`Message updated in ${newMessage.channel} channel`)
.addFields(
{ name: 'Old Message', value: oldContent! },
{ name: 'New Message', value: newContent! },
{
name: 'Old Message',
value: oldContent ?? 'No old message available',
},
{
name: 'New Message',
value: newContent ?? 'No new message available',
},
{ name: 'Author', value: newMessage.author.toString() },
{ name: 'Channel', value: newMessage.channel.toString() },
)
Expand Down

0 comments on commit e14f59b

Please sign in to comment.