From 7c7a7e53f9a0d5d19e3e4e5b02f63472604a049e Mon Sep 17 00:00:00 2001 From: Christopher F Date: Mon, 28 Aug 2017 16:44:30 -0400 Subject: [PATCH] RestGuild#DefaultChannelId will fall back to the guild ID Adding an exception here would be a breaking change, so this was agreed to fall back to the previous behavior, which would just return the guild ID. --- src/Discord.Net.Rest/Entities/Guilds/RestGuild.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Discord.Net.Rest/Entities/Guilds/RestGuild.cs b/src/Discord.Net.Rest/Entities/Guilds/RestGuild.cs index da25d2d60..0ad76c61a 100644 --- a/src/Discord.Net.Rest/Entities/Guilds/RestGuild.cs +++ b/src/Discord.Net.Rest/Entities/Guilds/RestGuild.cs @@ -33,9 +33,9 @@ namespace Discord.Rest internal bool Available { get; private set; } public DateTimeOffset CreatedAt => SnowflakeUtils.FromSnowflake(Id); + [Obsolete("DefaultChannelId is deprecated, use GetDefaultChannelAsync")] - public ulong DefaultChannelId => - throw new NotSupportedException("DefaultChannelId can not be accessed synchronously, see GetDefaultChannelAsync"); + public ulong DefaultChannelId => Id; public string IconUrl => CDN.GetGuildIconUrl(Id, IconId); public string SplashUrl => CDN.GetGuildSplashUrl(Id, SplashId);