Browse Source

Make DefaultChannel exclude threads (#2031)

tags/3.2.0
Quin Lynch GitHub 3 years ago
parent
commit
a06ba9fef8
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/Discord.Net.WebSocket/Entities/Guilds/SocketGuild.cs

+ 1
- 1
src/Discord.Net.WebSocket/Entities/Guilds/SocketGuild.cs View File

@@ -169,7 +169,7 @@ namespace Discord.WebSocket
/// 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>


Loading…
Cancel
Save