From e628f0f6f089a0840b9d69bea930dd3ad7fa7462 Mon Sep 17 00:00:00 2001 From: Vlad Frangu Date: Tue, 7 Sep 2021 12:56:14 +0300 Subject: [PATCH] fix(Embed): corrent certain optional types as being required (#192) BREAKING CHANGE: - `APIEmbedAuthor#name` is required, not optional - `APIEmbedThumbnail#url` is required, not optional - `APIEmbedImage#url` is required, not optional --- deno/payloads/v8/channel.ts | 6 +++--- deno/payloads/v9/channel.ts | 6 +++--- payloads/v8/channel.ts | 6 +++--- payloads/v9/channel.ts | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/deno/payloads/v8/channel.ts b/deno/payloads/v8/channel.ts index 35777b12..a17c3b15 100644 --- a/deno/payloads/v8/channel.ts +++ b/deno/payloads/v8/channel.ts @@ -660,7 +660,7 @@ export interface APIEmbedThumbnail { /** * Source url of thumbnail (only supports http(s) and attachments) */ - url?: string; + url: string; /** * A proxied url of the thumbnail */ @@ -700,7 +700,7 @@ export interface APIEmbedImage { /** * Source url of image (only supports http(s) and attachments) */ - url?: string; + url: string; /** * A proxied url of the image */ @@ -738,7 +738,7 @@ export interface APIEmbedAuthor { * * Length limit: 256 characters */ - name?: string; + name: string; /** * URL of author */ diff --git a/deno/payloads/v9/channel.ts b/deno/payloads/v9/channel.ts index c5b6275a..a000a801 100644 --- a/deno/payloads/v9/channel.ts +++ b/deno/payloads/v9/channel.ts @@ -789,7 +789,7 @@ export interface APIEmbedThumbnail { /** * Source url of thumbnail (only supports http(s) and attachments) */ - url?: string; + url: string; /** * A proxied url of the thumbnail */ @@ -829,7 +829,7 @@ export interface APIEmbedImage { /** * Source url of image (only supports http(s) and attachments) */ - url?: string; + url: string; /** * A proxied url of the image */ @@ -867,7 +867,7 @@ export interface APIEmbedAuthor { * * Length limit: 256 characters */ - name?: string; + name: string; /** * URL of author */ diff --git a/payloads/v8/channel.ts b/payloads/v8/channel.ts index 601d2358..71ded16b 100644 --- a/payloads/v8/channel.ts +++ b/payloads/v8/channel.ts @@ -660,7 +660,7 @@ export interface APIEmbedThumbnail { /** * Source url of thumbnail (only supports http(s) and attachments) */ - url?: string; + url: string; /** * A proxied url of the thumbnail */ @@ -700,7 +700,7 @@ export interface APIEmbedImage { /** * Source url of image (only supports http(s) and attachments) */ - url?: string; + url: string; /** * A proxied url of the image */ @@ -738,7 +738,7 @@ export interface APIEmbedAuthor { * * Length limit: 256 characters */ - name?: string; + name: string; /** * URL of author */ diff --git a/payloads/v9/channel.ts b/payloads/v9/channel.ts index ae06135b..6bd14193 100644 --- a/payloads/v9/channel.ts +++ b/payloads/v9/channel.ts @@ -789,7 +789,7 @@ export interface APIEmbedThumbnail { /** * Source url of thumbnail (only supports http(s) and attachments) */ - url?: string; + url: string; /** * A proxied url of the thumbnail */ @@ -829,7 +829,7 @@ export interface APIEmbedImage { /** * Source url of image (only supports http(s) and attachments) */ - url?: string; + url: string; /** * A proxied url of the image */ @@ -867,7 +867,7 @@ export interface APIEmbedAuthor { * * Length limit: 256 characters */ - name?: string; + name: string; /** * URL of author */