Skip to content

Commit

Permalink
Merge pull request #372 from Blocksnmore/main
Browse files Browse the repository at this point in the history
Fix: Error thrown from channel mention in webhook
  • Loading branch information
Helloyunho authored Dec 15, 2023
2 parents d570b9e + c6b71c9 commit 04bbcfc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/structures/messageMentions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ export class MessageMentions {
if (matchChannels !== null) {
for (const id of matchChannels) {
const parsedID = id.substr(2, id.length - 3)

if (this.client === undefined) continue

const channel = await this.client.channels.get<GuildTextBasedChannel>(
parsedID
)
Expand Down

0 comments on commit 04bbcfc

Please sign in to comment.