Make DefaultChannel exclude threads (#2031)
This commit is contained in:
@@ -169,7 +169,7 @@ namespace Discord.WebSocket
|
|||||||
/// A <see cref="SocketTextChannel"/> representing the first viewable channel that the user has access to.
|
/// A <see cref="SocketTextChannel"/> representing the first viewable channel that the user has access to.
|
||||||
/// </returns>
|
/// </returns>
|
||||||
public SocketTextChannel DefaultChannel => TextChannels
|
public SocketTextChannel DefaultChannel => TextChannels
|
||||||
.Where(c => CurrentUser.GetPermissions(c).ViewChannel)
|
.Where(c => CurrentUser.GetPermissions(c).ViewChannel && c is not IThreadChannel)
|
||||||
.OrderBy(c => c.Position)
|
.OrderBy(c => c.Position)
|
||||||
.FirstOrDefault();
|
.FirstOrDefault();
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user