Fix GetActiveThreadsAsync & add it to ITextChannel (#2526)

* fix `GetActiveThreadsAsync` being sadge

* ah, forgot about mocked channel
This commit is contained in:
Misha133
2022-12-14 09:56:06 +03:00
committed by GitHub
parent 55280a569e
commit bd2f719774
11 changed files with 51 additions and 8 deletions

View File

@@ -288,6 +288,10 @@ namespace Discord.Rest
/// <inheritdoc />
public Task SyncPermissionsAsync(RequestOptions options = null)
=> ChannelHelper.SyncPermissionsAsync(this, Discord, options);
/// <inheritdoc cref="ITextChannel.GetActiveThreadsAsync(RequestOptions)"/>
public virtual Task<IReadOnlyCollection<RestThreadChannel>> GetActiveThreadsAsync(RequestOptions options = null)
=> ThreadHelper.GetActiveThreadsAsync(Guild, Id, Discord, options);
#endregion
#region Invites
@@ -321,6 +325,10 @@ namespace Discord.Rest
async Task<IThreadChannel> ITextChannel.CreateThreadAsync(string name, ThreadType type, ThreadArchiveDuration autoArchiveDuration, IMessage message, bool? invitable, int? slowmode, RequestOptions options)
=> await CreateThreadAsync(name, type, autoArchiveDuration, message, invitable, slowmode, options);
/// <inheritdoc />
async Task<IReadOnlyCollection<IThreadChannel>> ITextChannel.GetActiveThreadsAsync(RequestOptions options)
=> await GetActiveThreadsAsync(options);
#endregion
#region IMessageChannel