Skip to content

Commit

Permalink
feat(APIMessageReferenceSend): add fail_if_not_exists (#82)
Browse files Browse the repository at this point in the history
  • Loading branch information
advaith1 committed Feb 4, 2021
1 parent 3bf9738 commit 855f36d
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion v8/rest/channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,18 @@ export type RESTGetAPIChannelMessagesResult = APIMessage[];
*/
export type RESTGetAPIChannelMessageResult = APIMessage;

export type APIMessageReferenceSend = Partial<APIMessageReference> & Required<Pick<APIMessageReference, 'message_id'>>;
/**
* https://discord.com/developers/docs/resources/channel#message-object-message-reference-structure
*/
export type APIMessageReferenceSend = Partial<APIMessageReference> &
Required<Pick<APIMessageReference, 'message_id'>> & {
/**
* Whether to error if the referenced message doesn't exist instead of sending as a normal (non-reply) message
*
* @default true
*/
fail_if_not_exists?: boolean;
};

/**
* https://discord.com/developers/docs/resources/channel#create-message
Expand Down

0 comments on commit 855f36d

Please sign in to comment.