Allow creating announcement channels (#2837)

This commit is contained in:
Mihail Gribkov
2024-02-11 23:48:40 +03:00
committed by GitHub
parent 4d7e384e51
commit f1777de164
7 changed files with 74 additions and 0 deletions

View File

@@ -840,6 +840,11 @@ namespace Discord.WebSocket
/// </returns>
public Task<RestTextChannel> CreateTextChannelAsync(string name, Action<TextChannelProperties> func = null, RequestOptions options = null)
=> GuildHelper.CreateTextChannelAsync(this, Discord, name, options, func);
/// <inheritdoc cref="IGuild.CreateNewsChannelAsync"/>
public Task<RestNewsChannel> CreateNewsChannelAsync(string name, Action<TextChannelProperties> func = null, RequestOptions options = null)
=> GuildHelper.CreateNewsChannelAsync(this, Discord, name, options, func);
/// <summary>
/// Creates a new voice channel in this guild.
/// </summary>
@@ -2132,6 +2137,11 @@ namespace Discord.WebSocket
/// <inheritdoc />
async Task<ITextChannel> IGuild.CreateTextChannelAsync(string name, Action<TextChannelProperties> func, RequestOptions options)
=> await CreateTextChannelAsync(name, func, options).ConfigureAwait(false);
/// <inheritdoc />
async Task<INewsChannel> IGuild.CreateNewsChannelAsync(string name, Action<TextChannelProperties> func, RequestOptions options)
=> await CreateNewsChannelAsync(name, func, options).ConfigureAwait(false);
/// <inheritdoc />
async Task<IVoiceChannel> IGuild.CreateVoiceChannelAsync(string name, Action<VoiceChannelProperties> func, RequestOptions options)
=> await CreateVoiceChannelAsync(name, func, options).ConfigureAwait(false);