Browse Source

Update CDN.cs

pull/2151/head
Quin Lynch 3 years ago
parent
commit
439a6ba7d5
1 changed files with 9 additions and 0 deletions
  1. +9
    -0
      src/Discord.Net.Core/CDN.cs

+ 9
- 0
src/Discord.Net.Core/CDN.cs View File

@@ -208,6 +208,15 @@ namespace Discord
public static string GetStickerUrl(ulong stickerId, StickerFormatType format = StickerFormatType.Png) public static string GetStickerUrl(ulong stickerId, StickerFormatType format = StickerFormatType.Png)
=> $"{DiscordConfig.CDNUrl}stickers/{stickerId}.{FormatToExtension(format)}"; => $"{DiscordConfig.CDNUrl}stickers/{stickerId}.{FormatToExtension(format)}";


/// <summary>
/// Returns an events cover image url.
/// </summary>
/// <param name="guildId">The guild id that the event is in.</param>
/// <param name="eventId">The id of the event.</param>
/// <param name="assetId">The id of the cover image asset.</param>
/// <param name="format">The format of the image.</param>
/// <param name="size">The size of the image.</param>
/// <returns></returns>
public static string GetEventCoverImageUrl(ulong guildId, ulong eventId, string assetId, ImageFormat format = ImageFormat.Auto, ushort size = 1024) public static string GetEventCoverImageUrl(ulong guildId, ulong eventId, string assetId, ImageFormat format = ImageFormat.Auto, ushort size = 1024)
=> $"{DiscordConfig.CDNUrl}guild-events/{guildId}/{eventId}/{assetId}.{FormatToExtension(format, assetId)}?size={size}"; => $"{DiscordConfig.CDNUrl}guild-events/{guildId}/{eventId}/{assetId}.{FormatToExtension(format, assetId)}?size={size}";




Loading…
Cancel
Save