Skip to content

Commit

Permalink
Fixed the issue where 'ChannelData#messages' is undefined. (#280)
Browse files Browse the repository at this point in the history
🐛 Fix ChannelData#messages undefined
  • Loading branch information
Uthsho authored Aug 14, 2021
1 parent 163c33e commit 3566abe
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,9 @@ export async function fetchChannelMessages (channel: TextChannel | NewsChannel |
pinned: msg.pinned
});
}));
return messages;
}

return messages;
}

/**
Expand Down Expand Up @@ -159,6 +160,7 @@ export async function fetchTextChannelData(channel: TextChannel | NewsChannel, o
/* Fetch channel messages */
try {
channelData.messages = await fetchChannelMessages(channel, options);

/* Return channel data */
resolve(channelData);
} catch {
Expand Down

0 comments on commit 3566abe

Please sign in to comment.