From ac26d9b1307d63e116b043505e5f925db7ed01aa Mon Sep 17 00:00:00 2001 From: Suneet Tipirneni <77477100+suneettipirneni@users.noreply.github.com> Date: Wed, 26 Jan 2022 04:24:43 -0500 Subject: [PATCH] feat(cdn): add support for scheduled event image covers (#7335) --- packages/rest/src/lib/CDN.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/packages/rest/src/lib/CDN.ts b/packages/rest/src/lib/CDN.ts index 1760c7dbc..e16bd8cd8 100644 --- a/packages/rest/src/lib/CDN.ts +++ b/packages/rest/src/lib/CDN.ts @@ -212,6 +212,20 @@ export class CDN { return this.makeURL(`/team-icons/${teamId}/${iconHash}`, options); } + /** + * Generates a cover image for a guild scheduled event. + * @param scheduledEventId The scheduled event id + * @param coverHash The hash provided by discord for this cover image + * @param options Optional options for the cover image + */ + public guildScheduledEventCover( + scheduledEventId: string, + coverHash: string, + options?: Readonly, + ): string { + return this.makeURL(`/guild-events/${scheduledEventId}/${coverHash}`, options); + } + /** * Constructs the URL for the resource, checking whether or not `hash` starts with `a_` if `dynamic` is set to `true`. * @param route The base cdn route