From 9564941b3ae51c8bc9b1f915d66b43775089db18 Mon Sep 17 00:00:00 2001 From: n1ck_pro <59617443+N1ckPro@users.noreply.github.com> Date: Mon, 12 Feb 2024 22:13:34 +0100 Subject: [PATCH] feat(RESTPostAPIChannelMessageJSONBody): add enforce_nonce (#874) --- deno/rest/v10/channel.ts | 5 +++++ deno/rest/v9/channel.ts | 5 +++++ rest/v10/channel.ts | 5 +++++ rest/v9/channel.ts | 5 +++++ 4 files changed, 20 insertions(+) diff --git a/deno/rest/v10/channel.ts b/deno/rest/v10/channel.ts index 29c54143..a6a727f6 100644 --- a/deno/rest/v10/channel.ts +++ b/deno/rest/v10/channel.ts @@ -318,6 +318,11 @@ export interface RESTPostAPIChannelMessageJSONBody { * Message flags combined as a bitfield */ flags?: MessageFlags | undefined; + /** + * If `true` and nonce is present, it will be checked for uniqueness in the past few minutes. + * If another message was created by the same author with the same nonce, that message will be returned and no new message will be created. + */ + enforce_nonce?: boolean | undefined; } /** diff --git a/deno/rest/v9/channel.ts b/deno/rest/v9/channel.ts index a5e1a828..019507f5 100644 --- a/deno/rest/v9/channel.ts +++ b/deno/rest/v9/channel.ts @@ -326,6 +326,11 @@ export interface RESTPostAPIChannelMessageJSONBody { * Message flags combined as a bitfield */ flags?: MessageFlags | undefined; + /** + * If `true` and nonce is present, it will be checked for uniqueness in the past few minutes. + * If another message was created by the same author with the same nonce, that message will be returned and no new message will be created. + */ + enforce_nonce?: boolean | undefined; } /** diff --git a/rest/v10/channel.ts b/rest/v10/channel.ts index 33e94d3f..1bd4a1d2 100644 --- a/rest/v10/channel.ts +++ b/rest/v10/channel.ts @@ -318,6 +318,11 @@ export interface RESTPostAPIChannelMessageJSONBody { * Message flags combined as a bitfield */ flags?: MessageFlags | undefined; + /** + * If `true` and nonce is present, it will be checked for uniqueness in the past few minutes. + * If another message was created by the same author with the same nonce, that message will be returned and no new message will be created. + */ + enforce_nonce?: boolean | undefined; } /** diff --git a/rest/v9/channel.ts b/rest/v9/channel.ts index ed437bba..0645a143 100644 --- a/rest/v9/channel.ts +++ b/rest/v9/channel.ts @@ -326,6 +326,11 @@ export interface RESTPostAPIChannelMessageJSONBody { * Message flags combined as a bitfield */ flags?: MessageFlags | undefined; + /** + * If `true` and nonce is present, it will be checked for uniqueness in the past few minutes. + * If another message was created by the same author with the same nonce, that message will be returned and no new message will be created. + */ + enforce_nonce?: boolean | undefined; } /**