From 855f36d9309ae69f57da723648d3791e3134089e Mon Sep 17 00:00:00 2001 From: Advaith Date: Thu, 4 Feb 2021 11:44:11 -0800 Subject: [PATCH] feat(APIMessageReferenceSend): add `fail_if_not_exists` (#82) --- v8/rest/channel.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/v8/rest/channel.ts b/v8/rest/channel.ts index 13b955e7..0f69c883 100644 --- a/v8/rest/channel.ts +++ b/v8/rest/channel.ts @@ -134,7 +134,18 @@ export type RESTGetAPIChannelMessagesResult = APIMessage[]; */ export type RESTGetAPIChannelMessageResult = APIMessage; -export type APIMessageReferenceSend = Partial & Required>; +/** + * https://discord.com/developers/docs/resources/channel#message-object-message-reference-structure + */ +export type APIMessageReferenceSend = Partial & + Required> & { + /** + * 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