Skip to content

Commit

Permalink
Make DefaultChannel exclude threads (#2031)
Browse files Browse the repository at this point in the history
  • Loading branch information
quinchs authored Jan 11, 2022
1 parent cd36bb8 commit a06ba9f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Discord.Net.WebSocket/Entities/Guilds/SocketGuild.cs
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ public class SocketGuild : SocketEntity<ulong>, IGuild, IDisposable
/// A <see cref="SocketTextChannel"/> representing the first viewable channel that the user has access to.
/// </returns>
public SocketTextChannel DefaultChannel => TextChannels
.Where(c => CurrentUser.GetPermissions(c).ViewChannel)
.Where(c => CurrentUser.GetPermissions(c).ViewChannel && c is not IThreadChannel)
.OrderBy(c => c.Position)
.FirstOrDefault();
/// <summary>
Expand Down

0 comments on commit a06ba9f

Please sign in to comment.