Browse Source

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.
pull/777/head
Christopher F 8 years ago
parent
commit
7c7a7e53f9
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/Discord.Net.Rest/Entities/Guilds/RestGuild.cs

+ 2
- 2
src/Discord.Net.Rest/Entities/Guilds/RestGuild.cs View File

@@ -33,9 +33,9 @@ namespace Discord.Rest
internal bool Available { get; private set; } internal bool Available { get; private set; }


public DateTimeOffset CreatedAt => SnowflakeUtils.FromSnowflake(Id); public DateTimeOffset CreatedAt => SnowflakeUtils.FromSnowflake(Id);

[Obsolete("DefaultChannelId is deprecated, use GetDefaultChannelAsync")] [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 IconUrl => CDN.GetGuildIconUrl(Id, IconId);
public string SplashUrl => CDN.GetGuildSplashUrl(Id, SplashId); public string SplashUrl => CDN.GetGuildSplashUrl(Id, SplashId);




Loading…
Cancel
Save