Skip to content

Commit

Permalink
fix lastMessage check in thread creation event
Browse files Browse the repository at this point in the history
  • Loading branch information
jonbarrow committed Jan 29, 2024
1 parent 38904de commit 260a767
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/events/threadCreate.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ async function threadCreateHandler(threadChannel) {

await threadChannel.messages.fetch();

if (threadChannel.lastMessage.author.bot) {
if (threadChannel.lastMessage?.author.bot) {
// * Bot already responded
return;
}
Expand Down

0 comments on commit 260a767

Please sign in to comment.