Changed Guild#DefaultChannel to resolve the first accessible channel (#777)
* Changed Guild#DefaultChannel to resolve the first accessible channel Resolves #776 This change is inline with hammerandchisel/discord-api-docs#329 RestGuild#DefaultChannelId is now obsolete and will throw a NotSupportedException. * 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.
This commit is contained in:
@@ -64,7 +64,7 @@ namespace Discord
|
||||
var text5 = textChannels.Where(x => x.Name == "text5").FirstOrDefault();
|
||||
|
||||
Assert.NotNull(text1);
|
||||
Assert.True(text1.Id == guild.DefaultChannelId);
|
||||
//Assert.True(text1.Id == guild.DefaultChannelId);
|
||||
Assert.Equal(text1.Position, 1);
|
||||
Assert.Equal(text1.Topic, "Topic1");
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ namespace Discord
|
||||
|
||||
foreach (var channel in textChannels)
|
||||
{
|
||||
if (channel.Id != guild.DefaultChannelId)
|
||||
//if (channel.Id != guild.DefaultChannelId)
|
||||
await channel.DeleteAsync();
|
||||
}
|
||||
foreach (var channel in voiceChannels)
|
||||
|
||||
Reference in New Issue
Block a user