Skip to content

Commit

Permalink
fix race condition
Browse files Browse the repository at this point in the history
  • Loading branch information
danieldietzler committed Oct 10, 2023
1 parent c8bdcc4 commit 87abc17
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/events/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ export class Messages {
}

@On({ event: 'messageCreate' })
preventGithubEmbeddings([message]: ArgsOf<'messageCreate'>) {
async preventGithubEmbeddings([message]: ArgsOf<'messageCreate'>) {
if (message.author.bot) {
return;
}

if (message.embeds.find((embed) => embed.url?.startsWith(GITHUB_DOMAIN))) {
message.suppressEmbeds(true);
await message.suppressEmbeds(true);
}
}
}

0 comments on commit 87abc17

Please sign in to comment.