Skip to content

Commit

Permalink
Fix error thrown from webhook channel mention
Browse files Browse the repository at this point in the history
  • Loading branch information
Blocksnmore committed Nov 12, 2023
1 parent e3e3c73 commit c6b71c9
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 c6b71c9

Please sign in to comment.