diff --git a/src/Discord.Net.Core/CDN.cs b/src/Discord.Net.Core/CDN.cs index e1e8e5e1a4..fcf95dd6ed 100644 --- a/src/Discord.Net.Core/CDN.cs +++ b/src/Discord.Net.Core/CDN.cs @@ -12,23 +12,35 @@ public static class CDN /// /// The team identifier. /// The icon identifier. + /// The size of the image to return in horizontal pixels. This can be any power of two between 16 and 2048 inclusive. + /// The format to return. /// /// A URL pointing to the team's icon. /// - public static string GetTeamIconUrl(ulong teamId, string iconId) - => iconId != null ? $"{DiscordConfig.CDNUrl}team-icons/{teamId}/{iconId}.jpg" : null; - + public static string GetTeamIconUrl(ulong teamId, string iconId, ushort size, ImageFormat format) + { + if (iconId == null) + return null; + string extension = FormatToExtension(format, string.Empty); + return $"{DiscordConfig.CDNUrl}team-icons/{teamId}/{iconId}.{extension}?size={size}"; + } /// /// Returns an application icon URL. /// /// The application identifier. /// The icon identifier. + /// The size of the image to return in. This can be any power of two between 16 and 2048 inclusive. + /// The format to return. /// /// A URL pointing to the application's icon. /// - public static string GetApplicationIconUrl(ulong appId, string iconId) - => iconId != null ? $"{DiscordConfig.CDNUrl}app-icons/{appId}/{iconId}.jpg" : null; - + public static string GetApplicationIconUrl(ulong appId, string iconId, ushort size, ImageFormat format) + { + if (iconId == null) + return null; + string extension = FormatToExtension(format, string.Empty); + return $"{DiscordConfig.CDNUrl}app-icons/{appId}/{iconId}.{extension}?size={size}"; + } /// /// Returns a user avatar URL. /// @@ -62,67 +74,101 @@ public static string GetDefaultUserAvatarUrl(ushort discriminator) /// /// The guild snowflake identifier. /// The icon identifier. + /// The size of the image to return in horizontal pixels. This can be any power of two between 16 and 2048 inclusive. + /// The format to return. /// /// A URL pointing to the guild's icon. /// - public static string GetGuildIconUrl(ulong guildId, string iconId) - => iconId != null ? $"{DiscordConfig.CDNUrl}icons/{guildId}/{iconId}.jpg" : null; + public static string GetGuildIconUrl(ulong guildId, string iconId, ushort size, ImageFormat format) + { + if (iconId == null) + return null; + string extension = FormatToExtension(format, iconId); + return $"{DiscordConfig.CDNUrl}icons/{guildId}/{iconId}.{extension}?size={size}"; + } /// /// Returns a guild splash URL. /// /// The guild snowflake identifier. /// The splash icon identifier. + /// The size of the image to return in. This can be any power of two between 16 and 2048 inclusive. + /// The format to return. /// /// A URL pointing to the guild's splash. /// - public static string GetGuildSplashUrl(ulong guildId, string splashId) - => splashId != null ? $"{DiscordConfig.CDNUrl}splashes/{guildId}/{splashId}.jpg" : null; + public static string GetGuildSplashUrl(ulong guildId, string splashId, ushort size, ImageFormat format) + { + if (splashId == null) + return null; + string extension = FormatToExtension(format, string.Empty); + return $"{DiscordConfig.CDNUrl}splashes/{guildId}/{splashId}.{extension}?size={size}"; + } /// /// Returns a guild discovery splash URL. /// /// The guild snowflake identifier. /// The discovery splash icon identifier. + /// The size of the image to return in. This can be any power of two between 16 and 2048 inclusive. + /// The format to return. /// /// A URL pointing to the guild's discovery splash. /// - public static string GetGuildDiscoverySplashUrl(ulong guildId, string discoverySplashId) - => discoverySplashId != null ? $"{DiscordConfig.CDNUrl}discovery-splashes/{guildId}/{discoverySplashId}.jpg" : null; + public static string GetGuildDiscoverySplashUrl(ulong guildId, string discoverySplashId, ushort size, ImageFormat format) + { + if (discoverySplashId == null) + return null; + string extension = FormatToExtension(format, string.Empty); + return $"{DiscordConfig.CDNUrl}discovery-splashes/{guildId}/{discoverySplashId}.{extension}?size={size}"; + } /// /// Returns a channel icon URL. /// /// The channel snowflake identifier. /// The icon identifier. + /// The size of the image to return in. This can be any power of two between 16 and 2048 inclusive. + /// The format to return. /// /// A URL pointing to the channel's icon. /// - public static string GetChannelIconUrl(ulong channelId, string iconId) - => iconId != null ? $"{DiscordConfig.CDNUrl}channel-icons/{channelId}/{iconId}.jpg" : null; - + public static string GetChannelIconUrl(ulong channelId, string iconId, ushort size, ImageFormat format) + { + if (iconId == null) + return null; + string extension = FormatToExtension(format, iconId); + return $"{DiscordConfig.CDNUrl}channel-icons/{channelId}/{iconId}.{extension}?size={size}"; + } /// /// Returns a guild banner URL. /// /// The guild snowflake identifier. /// The banner image identifier. /// The size of the image to return in horizontal pixels. This can be any power of two between 16 and 2048 inclusive. + /// The format to return. /// /// A URL pointing to the guild's banner image. /// - public static string GetGuildBannerUrl(ulong guildId, string bannerId, ushort? size = null) + public static string GetGuildBannerUrl(ulong guildId, string bannerId, ushort? size = null, ImageFormat? format = null) { - if (!string.IsNullOrEmpty(bannerId)) - return $"{DiscordConfig.CDNUrl}banners/{guildId}/{bannerId}.jpg" + (size.HasValue ? $"?size={size}" : string.Empty); - return null; + if (string.IsNullOrEmpty(bannerId)) + return null; + string extension = format.HasValue ? FormatToExtension(format.Value, string.Empty) : "png"; + return $"{DiscordConfig.CDNUrl}banners/{guildId}/{bannerId}.{extension}" + (size.HasValue ? $"?size={size}" : string.Empty); } /// /// Returns an emoji URL. /// /// The emoji snowflake identifier. /// Whether this emoji is animated. + /// The size of the image to return in horizontal pixels. This can be any power of two between 16 and 128. + /// The format to return. /// /// A URL pointing to the custom emote. /// - public static string GetEmojiUrl(ulong emojiId, bool animated) - => $"{DiscordConfig.CDNUrl}emojis/{emojiId}.{(animated ? "gif" : "png")}"; + public static string GetEmojiUrl(ulong emojiId, bool animated, ushort size, ImageFormat format) + { + string extension = format == ImageFormat.Auto && animated ? "gif" : FormatToExtension(format, string.Empty); + return $"{DiscordConfig.CDNUrl}emojis/{emojiId}.{extension}?size={size}"; + } /// /// Returns a Rich Presence asset URL. @@ -136,7 +182,7 @@ public static string GetEmojiUrl(ulong emojiId, bool animated) /// public static string GetRichAssetUrl(ulong appId, string assetId, ushort size, ImageFormat format) { - string extension = FormatToExtension(format, ""); + string extension = FormatToExtension(format, string.Empty); return $"{DiscordConfig.CDNUrl}app-assets/{appId}/{assetId}.{extension}?size={size}"; } @@ -173,6 +219,8 @@ private static string FormatToExtension(ImageFormat format, string imageId) return "png"; case ImageFormat.WebP: return "webp"; + case ImageFormat.Lottie: + return "json"; default: throw new ArgumentException(nameof(format)); } diff --git a/src/Discord.Net.Core/Entities/Emotes/Emote.cs b/src/Discord.Net.Core/Entities/Emotes/Emote.cs index 6054b3f747..5ec43bf0d7 100644 --- a/src/Discord.Net.Core/Entities/Emotes/Emote.cs +++ b/src/Discord.Net.Core/Entities/Emotes/Emote.cs @@ -29,7 +29,8 @@ public class Emote : IEmote, ISnowflakeEntity /// /// A string that points to the URL of this emote. /// - public string Url => CDN.GetEmojiUrl(Id, Animated); + [Obsolete("This property is obsolete. Call GetUrl instead.")] + public string Url => CDN.GetEmojiUrl(Id, Animated, 128, ImageFormat.Auto); internal Emote(ulong id, string name, bool animated) { @@ -38,6 +39,15 @@ internal Emote(ulong id, string name, bool animated) Animated = animated; } + /// + /// Get the URL for this Emote. + /// + /// The format to return. + /// The size of the image to return in. This can be any power of two between 16 and 128 inclusive. + /// A URL pointing to the custom emote. + public string GetUrl(ImageFormat format = ImageFormat.Auto, ushort size = 128) + => CDN.GetEmojiUrl(Id, Animated, size, format); + /// /// Determines whether the specified emote is equal to the current emote. /// diff --git a/src/Discord.Net.Core/Entities/Guilds/IGuild.cs b/src/Discord.Net.Core/Entities/Guilds/IGuild.cs index b8fd858dfc..a6f5cdc573 100644 --- a/src/Discord.Net.Core/Entities/Guilds/IGuild.cs +++ b/src/Discord.Net.Core/Entities/Guilds/IGuild.cs @@ -324,6 +324,54 @@ public interface IGuild : IDeletable, ISnowflakeEntity /// CultureInfo PreferredCulture { get; } + /// + /// Get the icon URL for this Guild. + /// + /// + /// This property retrieves a URL for this Guild's icon. In event that the guild does not have a valid icon + /// (i.e. their icon identifier is not set), this property will return null. + /// + /// The format to return. + /// The size of the image to return in. This can be any power of two between 16 and 2048 inclusive. + /// A string representing the guild's icon URL; null if the guild does not have an icon in place. + string GetIconUrl(ImageFormat format = ImageFormat.Auto, ushort size = 128); + + /// + /// Get the splash URL for this Guild. + /// + /// + /// This property retrieves a URL for this Guild's splash. In event that the guild does not have a valid splash + /// (i.e. their splash identifier is not set), this property will return null. + /// + /// The format to return. + /// The size of the image to return in. This can be any power of two between 16 and 2048 inclusive. + /// A string representing the guild's splash URL; null if the guild does not have an splash in place. + string GetSplashUrl(ImageFormat format = ImageFormat.Auto, ushort size = 128); + + /// + /// Get the discovery splash URL for this Guild. + /// + /// + /// This property retrieves a URL for this Guild's discovery splash. In event that the guild does not have a valid discovery splash + /// (i.e. their discovery splash identifier is not set), this property will return null. + /// + /// The format to return. + /// The size of the image to return in. This can be any power of two between 16 and 2048 inclusive. + /// A string representing the guild's discovery splash URL; null if the guild does not have a discovery splash in place. + string GetDiscoverySplashUrl(ImageFormat format = ImageFormat.Auto, ushort size = 128); + + /// + /// Get the banner URL for this Guild. + /// + /// + /// This property retrieves a URL for this Guild's banner. In event that the guild does not have a valid banner + /// (i.e. their banner identifier is not set), this property will return null. + /// + /// The format to return. + /// The size of the image to return in. This can be any power of two between 16 and 2048 inclusive. + /// A string representing the guild's banner URL; null if the guild does not have a banner in place. + string GetBannerUrl(ImageFormat format = ImageFormat.Auto, ushort size = 128); + /// /// Modifies this guild. /// diff --git a/src/Discord.Net.Core/Entities/Guilds/IUserGuild.cs b/src/Discord.Net.Core/Entities/Guilds/IUserGuild.cs index b6685edf61..53056e312f 100644 --- a/src/Discord.Net.Core/Entities/Guilds/IUserGuild.cs +++ b/src/Discord.Net.Core/Entities/Guilds/IUserGuild.cs @@ -18,5 +18,17 @@ public interface IUserGuild : IDeletable, ISnowflakeEntity /// Returns the current user's permissions for this guild. /// GuildPermissions Permissions { get; } + + /// + /// Get the icon URL for this UserGuild. + /// + /// + /// This property retrieves a URL for this UserGuild's icon. In event that the user guild does not have a valid icon + /// (i.e. their icon identifier is not set), this property will return null. + /// + /// The format to return. + /// The size of the image to return in. This can be any power of two between 16 and 2048 inclusive. + /// A string representing the user guild's icon URL; null if the user guild does not have an icon in place. + string GetIconUrl(ImageFormat format = ImageFormat.Auto, ushort size = 128); } } diff --git a/src/Discord.Net.Core/Entities/IApplication.cs b/src/Discord.Net.Core/Entities/IApplication.cs index 2174baff9c..08626866c7 100644 --- a/src/Discord.Net.Core/Entities/IApplication.cs +++ b/src/Discord.Net.Core/Entities/IApplication.cs @@ -21,7 +21,7 @@ public interface IApplication : ISnowflakeEntity /// /// Gets the icon URL of the application. /// - string IconUrl { get; } + string IconUrl { get; } /// /// Gets if the bot is public. /// @@ -39,5 +39,17 @@ public interface IApplication : ISnowflakeEntity /// Gets the partial user object containing info on the owner of the application. /// IUser Owner { get; } + + /// + /// Get the icon URL for this Application. + /// + /// + /// This property retrieves a URL for this Application's icon. In event that the application does not have a valid icon + /// (i.e. their icon identifier is not set), this property will return null. + /// + /// The format to return. + /// The size of the image to return in. This can be any power of two between 16 and 2048 inclusive. + /// A string representing the application's icon URL; null if the application does not have an icon in place. + string GetIconUrl(ImageFormat format = ImageFormat.Auto, ushort size = 128); } } diff --git a/src/Discord.Net.Core/Entities/ImageFormat.cs b/src/Discord.Net.Core/Entities/ImageFormat.cs index 9c04328f44..bfea97bdd9 100644 --- a/src/Discord.Net.Core/Entities/ImageFormat.cs +++ b/src/Discord.Net.Core/Entities/ImageFormat.cs @@ -25,5 +25,9 @@ public enum ImageFormat /// Use GIF. /// Gif, + /// + /// Use Lottie. + /// + Lottie, } } diff --git a/src/Discord.Net.Core/Entities/Teams/ITeam.cs b/src/Discord.Net.Core/Entities/Teams/ITeam.cs index b6e3d987b5..51196991bb 100644 --- a/src/Discord.Net.Core/Entities/Teams/ITeam.cs +++ b/src/Discord.Net.Core/Entities/Teams/ITeam.cs @@ -27,5 +27,16 @@ public interface ITeam /// Gets the user identifier that owns this team. /// ulong OwnerUserId { get; } + /// + /// Get the icon URL for this Team. + /// + /// + /// This property retrieves a URL for this Team's icon. In event that the team does not have a valid icon + /// (i.e. their icon identifier is not set), this property will return null. + /// + /// The format to return. + /// The size of the image to return in. This can be any power of two between 16 and 2048 inclusive. + /// A string representing the team's icon URL; null if the team does not have an icon in place. + string GetIconUrl(ImageFormat format = ImageFormat.Auto, ushort size = 128); } } diff --git a/src/Discord.Net.Rest/Entities/Guilds/RestGuild.cs b/src/Discord.Net.Rest/Entities/Guilds/RestGuild.cs index ea703a26af..18e6d75a9c 100644 --- a/src/Discord.Net.Rest/Entities/Guilds/RestGuild.cs +++ b/src/Discord.Net.Rest/Entities/Guilds/RestGuild.cs @@ -91,13 +91,17 @@ public class RestGuild : RestEntity, IGuild, IUpdateable public DateTimeOffset CreatedAt => SnowflakeUtils.FromSnowflake(Id); /// - public string IconUrl => CDN.GetGuildIconUrl(Id, IconId); + [Obsolete("This property is obsolete. Call GetIconUrl instead.")] + public string IconUrl => CDN.GetGuildIconUrl(Id, IconId, 128, ImageFormat.Jpeg); /// - public string SplashUrl => CDN.GetGuildSplashUrl(Id, SplashId); + [Obsolete("This property is obsolete. Call GetSplashUrl instead.")] + public string SplashUrl => CDN.GetGuildSplashUrl(Id, SplashId, 128, ImageFormat.Jpeg); /// - public string DiscoverySplashUrl => CDN.GetGuildDiscoverySplashUrl(Id, DiscoverySplashId); + [Obsolete("This property is obsolete. Call GetDiscoverySplashUrl instead.")] + public string DiscoverySplashUrl => CDN.GetGuildDiscoverySplashUrl(Id, DiscoverySplashId, 128, ImageFormat.Jpeg); /// - public string BannerUrl => CDN.GetGuildBannerUrl(Id, BannerId); + [Obsolete("This property is obsolete. Call GetBannerUrl instead.")] + public string BannerUrl => CDN.GetGuildBannerUrl(Id, BannerId, 128, ImageFormat.Jpeg); /// /// Gets the built-in role containing all users in this guild. @@ -196,6 +200,19 @@ internal void Update(WidgetModel model) } //General + /// + public string GetIconUrl(ImageFormat format = ImageFormat.Auto, ushort size = 128) + => CDN.GetGuildIconUrl(Id, IconId, size, format); + /// + public string GetSplashUrl(ImageFormat format = ImageFormat.Auto, ushort size = 128) + => CDN.GetGuildSplashUrl(Id, SplashId, size, format); + /// + public string GetDiscoverySplashUrl(ImageFormat format = ImageFormat.Auto, ushort size = 128) + => CDN.GetGuildDiscoverySplashUrl(Id, DiscoverySplashId, size, format); + /// + public string GetBannerUrl(ImageFormat format = ImageFormat.Auto, ushort size = 128) + => CDN.GetGuildBannerUrl(Id, BannerId, size, format); + /// public async Task UpdateAsync(RequestOptions options = null) => Update(await Discord.ApiClient.GetGuildAsync(Id, false, options).ConfigureAwait(false)); diff --git a/src/Discord.Net.Rest/Entities/Guilds/RestUserGuild.cs b/src/Discord.Net.Rest/Entities/Guilds/RestUserGuild.cs index b75d6288e5..5466721a4f 100644 --- a/src/Discord.Net.Rest/Entities/Guilds/RestUserGuild.cs +++ b/src/Discord.Net.Rest/Entities/Guilds/RestUserGuild.cs @@ -20,7 +20,8 @@ public class RestUserGuild : RestEntity, IUserGuild /// public DateTimeOffset CreatedAt => SnowflakeUtils.FromSnowflake(Id); /// - public string IconUrl => CDN.GetGuildIconUrl(Id, _iconId); + [Obsolete("This property is obsolete. Call GetIconUrl instead.")] + public string IconUrl => CDN.GetGuildIconUrl(Id, _iconId, 128, ImageFormat.Jpeg); internal RestUserGuild(BaseDiscordClient discord, ulong id) : base(discord, id) @@ -40,7 +41,11 @@ internal void Update(Model model) Name = model.Name; Permissions = new GuildPermissions(model.Permissions); } - + + /// + public string GetIconUrl(ImageFormat format = ImageFormat.Auto, ushort size = 128) + => CDN.GetApplicationIconUrl(Id, _iconId, size, format); + public async Task LeaveAsync(RequestOptions options = null) { await Discord.ApiClient.LeaveGuildAsync(Id, options).ConfigureAwait(false); diff --git a/src/Discord.Net.Rest/Entities/RestApplication.cs b/src/Discord.Net.Rest/Entities/RestApplication.cs index 5c2f872cf8..0a6e561741 100644 --- a/src/Discord.Net.Rest/Entities/RestApplication.cs +++ b/src/Discord.Net.Rest/Entities/RestApplication.cs @@ -34,7 +34,8 @@ public class RestApplication : RestEntity, IApplication /// public DateTimeOffset CreatedAt => SnowflakeUtils.FromSnowflake(Id); /// - public string IconUrl => CDN.GetApplicationIconUrl(Id, _iconId); + [Obsolete("This property is obsolete. Call GetIconUrl instead.")] + public string IconUrl => CDN.GetApplicationIconUrl(Id, _iconId, 128, ImageFormat.Jpeg); internal RestApplication(BaseDiscordClient discord, ulong id) : base(discord, id) @@ -47,7 +48,7 @@ internal static RestApplication Create(BaseDiscordClient discord, Model model) return entity; } internal void Update(Model model) - { + { Description = model.Description; RPCOrigins = model.RPCOrigins; Name = model.Name; @@ -72,6 +73,10 @@ public async Task UpdateAsync() Update(response); } + /// + public string GetIconUrl(ImageFormat format = ImageFormat.Auto, ushort size = 128) + => CDN.GetApplicationIconUrl(Id, _iconId, size, format); + /// /// Gets the name of the application. /// diff --git a/src/Discord.Net.Rest/Entities/Teams/RestTeam.cs b/src/Discord.Net.Rest/Entities/Teams/RestTeam.cs index 43c9417cc0..d46a87d4f9 100644 --- a/src/Discord.Net.Rest/Entities/Teams/RestTeam.cs +++ b/src/Discord.Net.Rest/Entities/Teams/RestTeam.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using System.Collections.Immutable; using System.Linq; +using System; using Model = Discord.API.Team; namespace Discord.Rest @@ -8,7 +9,8 @@ namespace Discord.Rest public class RestTeam : RestEntity, ITeam { /// - public string IconUrl => _iconId != null ? CDN.GetTeamIconUrl(Id, _iconId) : null; + [Obsolete("This property is obsolete. Call GetIconUrl instead.")] + public string IconUrl => _iconId != null ? CDN.GetTeamIconUrl(Id, _iconId, 128, ImageFormat.Jpeg) : null; /// public IReadOnlyList TeamMembers { get; private set; } /// @@ -36,5 +38,9 @@ internal virtual void Update(Model model) OwnerUserId = model.OwnerUserId; TeamMembers = model.TeamMembers.Select(x => new RestTeamMember(Discord, x)).ToImmutableArray(); } + + /// + public string GetIconUrl(ImageFormat format = ImageFormat.Auto, ushort size = 128) + => CDN.GetTeamIconUrl(Id, _iconId, size, format); } } diff --git a/src/Discord.Net.WebSocket/Entities/Guilds/SocketGuild.cs b/src/Discord.Net.WebSocket/Entities/Guilds/SocketGuild.cs index 9af4ad57e7..44fb532329 100644 --- a/src/Discord.Net.WebSocket/Entities/Guilds/SocketGuild.cs +++ b/src/Discord.Net.WebSocket/Entities/Guilds/SocketGuild.cs @@ -125,13 +125,17 @@ public class SocketGuild : SocketEntity, IGuild, IDisposable /// public DateTimeOffset CreatedAt => SnowflakeUtils.FromSnowflake(Id); /// - public string IconUrl => CDN.GetGuildIconUrl(Id, IconId); + [Obsolete("This property is obsolete. Call GetIconUrl instead.")] + public string IconUrl => CDN.GetGuildIconUrl(Id, IconId, 128, ImageFormat.Jpeg); /// - public string SplashUrl => CDN.GetGuildSplashUrl(Id, SplashId); + [Obsolete("This property is obsolete. Call GetSplashUrl instead.")] + public string SplashUrl => CDN.GetGuildSplashUrl(Id, SplashId, 128, ImageFormat.Jpeg); /// - public string DiscoverySplashUrl => CDN.GetGuildDiscoverySplashUrl(Id, DiscoverySplashId); + [Obsolete("This property is obsolete. Call GetDiscoverySplashUrl instead.")] + public string DiscoverySplashUrl => CDN.GetGuildDiscoverySplashUrl(Id, DiscoverySplashId, 128, ImageFormat.Jpeg); /// - public string BannerUrl => CDN.GetGuildBannerUrl(Id, BannerId); + [Obsolete("This property is obsolete. Call GetBannerUrl instead.")] + public string BannerUrl => CDN.GetGuildBannerUrl(Id, BannerId, 128, ImageFormat.Jpeg); /// Indicates whether the client has all the members downloaded to the local guild cache. public bool HasAllMembers => MemberCount <= DownloadedMemberCount;// _downloaderPromise.Task.IsCompleted; /// Indicates whether the guild cache is synced to this guild. @@ -516,6 +520,19 @@ internal void Update(ClientState state, EmojiUpdateModel model) } //General + /// + public string GetIconUrl(ImageFormat format = ImageFormat.Auto, ushort size = 128) + => CDN.GetGuildIconUrl(Id, IconId, size, format); + /// + public string GetSplashUrl(ImageFormat format = ImageFormat.Auto, ushort size = 128) + => CDN.GetGuildSplashUrl(Id, SplashId, size, format); + /// + public string GetDiscoverySplashUrl(ImageFormat format = ImageFormat.Auto, ushort size = 128) + => CDN.GetGuildDiscoverySplashUrl(Id, DiscoverySplashId, size, format); + /// + public string GetBannerUrl(ImageFormat format = ImageFormat.Auto, ushort size = 128) + => CDN.GetGuildBannerUrl(Id, BannerId, size, format); + /// public Task DeleteAsync(RequestOptions options = null) => GuildHelper.DeleteAsync(this, Discord, options); @@ -1243,7 +1260,7 @@ Task IGuild.GetTextChannelAsync(ulong id, CacheMode mode, RequestO Task> IGuild.GetVoiceChannelsAsync(CacheMode mode, RequestOptions options) => Task.FromResult>(VoiceChannels); /// - Task> IGuild.GetCategoriesAsync(CacheMode mode , RequestOptions options) + Task> IGuild.GetCategoriesAsync(CacheMode mode, RequestOptions options) => Task.FromResult>(CategoryChannels); /// Task IGuild.GetVoiceChannelAsync(ulong id, CacheMode mode, RequestOptions options)