Skip to content

Commit

Permalink
replyMessageIDs being empty, errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
pakkographic committed Aug 14, 2024
1 parent 6ecd280 commit 37f8617
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/routes/Channels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,7 @@ export class Channels {
): Promise<Message<T>> {
if (typeof options !== "object") throw new Error("message options should be an object.");
options.replyMessageIDs = [...new Set(options.replyMessageIDs)]; // Remove duplicates.
if (options.replyMessageIDs.length === 0) options.replyMessageIDs = undefined;
return this.#manager.authRequest<POSTChannelMessageResponse>({
method: "POST",
path: endpoints.CHANNEL_MESSAGES(channelID),
Expand Down

0 comments on commit 37f8617

Please sign in to comment.