Skip to content

Commit 1b1830b

Browse files
authored
Update messageUpdate.ts
1 parent 8390cfd commit 1b1830b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/events/messageUpdate.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ import { DatabaseKeys, DENO_KV_URL } from '../config';
1515
import { openKv } from '@deno/kv';
1616
import { Snowflake, TimestampStyles } from 'discord.js';
1717

18-
export const execute = async (old: Message, updated: Message) => {
18+
export const execute = async (old?: Message, updated: Message) => {
1919
try {
20+
if (!old) throw new Error('Gracefully caught ReferenceError: old is not defined');
2021
if (
2122
old.author.bot ||
2223
!old.inGuild() ||

0 commit comments

Comments
 (0)