IIntegrationChannel & create webhooks in forums (#2582)

This commit is contained in:
Misha133
2023-02-09 14:36:35 +03:00
committed by GitHub
parent 59c2008eaa
commit 75f3c91f9a
11 changed files with 131 additions and 50 deletions

View File

@@ -307,17 +307,22 @@ namespace Discord.Rest
private string DebuggerDisplay => $"{Name} ({Id}, Text)";
#endregion
#region ITextChannel
#region IIntegrationChannel
/// <inheritdoc />
async Task<IWebhook> ITextChannel.CreateWebhookAsync(string name, Stream avatar, RequestOptions options)
async Task<IWebhook> IIntegrationChannel.CreateWebhookAsync(string name, Stream avatar, RequestOptions options)
=> await CreateWebhookAsync(name, avatar, options).ConfigureAwait(false);
/// <inheritdoc />
async Task<IWebhook> ITextChannel.GetWebhookAsync(ulong id, RequestOptions options)
async Task<IWebhook> IIntegrationChannel.GetWebhookAsync(ulong id, RequestOptions options)
=> await GetWebhookAsync(id, options).ConfigureAwait(false);
/// <inheritdoc />
async Task<IReadOnlyCollection<IWebhook>> ITextChannel.GetWebhooksAsync(RequestOptions options)
async Task<IReadOnlyCollection<IWebhook>> IIntegrationChannel.GetWebhooksAsync(RequestOptions options)
=> await GetWebhooksAsync(options).ConfigureAwait(false);
#endregion
#region ITextChannel
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);