| @@ -5,7 +5,7 @@ | |||||
| public static string GetApplicationIconUrl(ulong appId, string iconId) | public static string GetApplicationIconUrl(ulong appId, string iconId) | ||||
| => iconId != null ? $"{DiscordConfig.CDNUrl}app-icons/{appId}/{iconId}.jpg" : null; | => iconId != null ? $"{DiscordConfig.CDNUrl}app-icons/{appId}/{iconId}.jpg" : null; | ||||
| public static string GetUserAvatarUrl(ulong userId, string avatarId, ushort size) | public static string GetUserAvatarUrl(ulong userId, string avatarId, ushort size) | ||||
| => avatarId != null ? $"{DiscordConfig.AvatarUrl}avatars/{userId}/{avatarId}.webp?size={size}" : null; | |||||
| => avatarId != null ? $"{DiscordConfig.CDNUrl}avatars/{userId}/{avatarId}.webp?size={size}" : null; | |||||
| public static string GetGuildIconUrl(ulong guildId, string iconId) | public static string GetGuildIconUrl(ulong guildId, string iconId) | ||||
| => iconId != null ? $"{DiscordConfig.CDNUrl}icons/{guildId}/{iconId}.jpg" : null; | => iconId != null ? $"{DiscordConfig.CDNUrl}icons/{guildId}/{iconId}.jpg" : null; | ||||
| public static string GetGuildSplashUrl(ulong guildId, string splashId) | public static string GetGuildSplashUrl(ulong guildId, string splashId) | ||||
| @@ -12,7 +12,6 @@ namespace Discord | |||||
| public static readonly string ClientAPIUrl = $"https://discordapp.com/api/v{APIVersion}/"; | public static readonly string ClientAPIUrl = $"https://discordapp.com/api/v{APIVersion}/"; | ||||
| public const string CDNUrl = "https://cdn.discordapp.com/"; | public const string CDNUrl = "https://cdn.discordapp.com/"; | ||||
| public const string AvatarUrl = "https://images.discordapp.net/"; | |||||
| public const string InviteUrl = "https://discord.gg/"; | public const string InviteUrl = "https://discord.gg/"; | ||||
| public const int DefaultRequestTimeout = 15000; | public const int DefaultRequestTimeout = 15000; | ||||
| @@ -13,7 +13,7 @@ namespace Discord.Rest | |||||
| public ushort DiscriminatorValue { get; private set; } | public ushort DiscriminatorValue { get; private set; } | ||||
| public string AvatarId { get; private set; } | public string AvatarId { get; private set; } | ||||
| public string GetAvatarUrl(ushort size) => API.CDN.GetUserAvatarUrl(Id, AvatarId, size); | |||||
| public string GetAvatarUrl(ushort size) => CDN.GetUserAvatarUrl(Id, AvatarId, size); | |||||
| public DateTimeOffset CreatedAt => DateTimeUtils.FromSnowflake(Id); | public DateTimeOffset CreatedAt => DateTimeUtils.FromSnowflake(Id); | ||||
| public string Discriminator => DiscriminatorValue.ToString("D4"); | public string Discriminator => DiscriminatorValue.ToString("D4"); | ||||
| public string Mention => MentionUtils.MentionUser(Id); | public string Mention => MentionUtils.MentionUser(Id); | ||||
| @@ -14,7 +14,7 @@ namespace Discord.Rpc | |||||
| public ushort DiscriminatorValue { get; private set; } | public ushort DiscriminatorValue { get; private set; } | ||||
| public string AvatarId { get; private set; } | public string AvatarId { get; private set; } | ||||
| public string GetAvatarUrl(ushort size) => API.CDN.GetUserAvatarUrl(Id, AvatarId, size); | |||||
| public string GetAvatarUrl(ushort size) => CDN.GetUserAvatarUrl(Id, AvatarId, size); | |||||
| public DateTimeOffset CreatedAt => DateTimeUtils.FromSnowflake(Id); | public DateTimeOffset CreatedAt => DateTimeUtils.FromSnowflake(Id); | ||||
| public string Discriminator => DiscriminatorValue.ToString("D4"); | public string Discriminator => DiscriminatorValue.ToString("D4"); | ||||
| public string Mention => MentionUtils.MentionUser(Id); | public string Mention => MentionUtils.MentionUser(Id); | ||||
| @@ -15,7 +15,7 @@ namespace Discord.WebSocket | |||||
| internal abstract SocketGlobalUser GlobalUser { get; } | internal abstract SocketGlobalUser GlobalUser { get; } | ||||
| internal abstract SocketPresence Presence { get; set; } | internal abstract SocketPresence Presence { get; set; } | ||||
| public string GetAvatarUrl(ushort size) => API.CDN.GetUserAvatarUrl(Id, AvatarId, size); | |||||
| public string GetAvatarUrl(ushort size) => CDN.GetUserAvatarUrl(Id, AvatarId, size); | |||||
| public DateTimeOffset CreatedAt => DateTimeUtils.FromSnowflake(Id); | public DateTimeOffset CreatedAt => DateTimeUtils.FromSnowflake(Id); | ||||
| public string Discriminator => DiscriminatorValue.ToString("D4"); | public string Discriminator => DiscriminatorValue.ToString("D4"); | ||||
| public string Mention => MentionUtils.MentionUser(Id); | public string Mention => MentionUtils.MentionUser(Id); | ||||