@@ -109,9 +109,9 @@ namespace Discord | |||||
Task<ITextChannel> GetDefaultChannelAsync(CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null); | Task<ITextChannel> GetDefaultChannelAsync(CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null); | ||||
Task<IGuildChannel> GetEmbedChannelAsync(CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null); | Task<IGuildChannel> GetEmbedChannelAsync(CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null); | ||||
/// <summary> Creates a new text channel. </summary> | /// <summary> Creates a new text channel. </summary> | ||||
Task<ITextChannel> CreateTextChannelAsync(string name, RequestOptions options = null, Action<TextChannelProperties> func = null); | |||||
Task<ITextChannel> CreateTextChannelAsync(string name, Action<TextChannelProperties> func = null, RequestOptions options = null); | |||||
/// <summary> Creates a new voice channel. </summary> | /// <summary> Creates a new voice channel. </summary> | ||||
Task<IVoiceChannel> CreateVoiceChannelAsync(string name, RequestOptions options = null, Action<VoiceChannelProperties> func = null); | |||||
Task<IVoiceChannel> CreateVoiceChannelAsync(string name, Action<VoiceChannelProperties> func = null, RequestOptions options = null); | |||||
/// <summary> Creates a new channel category. </summary> | /// <summary> Creates a new channel category. </summary> | ||||
Task<ICategoryChannel> CreateCategoryAsync(string name, RequestOptions options = null); | Task<ICategoryChannel> CreateCategoryAsync(string name, RequestOptions options = null); | ||||
@@ -222,9 +222,9 @@ namespace Discord.Rest | |||||
} | } | ||||
return null; | return null; | ||||
} | } | ||||
public Task<RestTextChannel> CreateTextChannelAsync(string name, RequestOptions options = null, Action<TextChannelProperties> func = null) | |||||
public Task<RestTextChannel> CreateTextChannelAsync(string name, Action<TextChannelProperties> func = null, RequestOptions options = null) | |||||
=> GuildHelper.CreateTextChannelAsync(this, Discord, name, options, func); | => GuildHelper.CreateTextChannelAsync(this, Discord, name, options, func); | ||||
public Task<RestVoiceChannel> CreateVoiceChannelAsync(string name, RequestOptions options = null, Action<VoiceChannelProperties> func = null) | |||||
public Task<RestVoiceChannel> CreateVoiceChannelAsync(string name, Action<VoiceChannelProperties> func = null, RequestOptions options = null) | |||||
=> GuildHelper.CreateVoiceChannelAsync(this, Discord, name, options, func); | => GuildHelper.CreateVoiceChannelAsync(this, Discord, name, options, func); | ||||
public Task<RestCategoryChannel> CreateCategoryChannelAsync(string name, RequestOptions options = null) | public Task<RestCategoryChannel> CreateCategoryChannelAsync(string name, RequestOptions options = null) | ||||
=> GuildHelper.CreateCategoryChannelAsync(this, Discord, name, options); | => GuildHelper.CreateCategoryChannelAsync(this, Discord, name, options); | ||||
@@ -383,10 +383,10 @@ namespace Discord.Rest | |||||
else | else | ||||
return null; | return null; | ||||
} | } | ||||
async Task<ITextChannel> IGuild.CreateTextChannelAsync(string name, RequestOptions options, Action<TextChannelProperties> func) | |||||
=> await CreateTextChannelAsync(name, options, func).ConfigureAwait(false); | |||||
async Task<IVoiceChannel> IGuild.CreateVoiceChannelAsync(string name, RequestOptions options, Action<VoiceChannelProperties> func) | |||||
=> await CreateVoiceChannelAsync(name, options, func).ConfigureAwait(false); | |||||
async Task<ITextChannel> IGuild.CreateTextChannelAsync(string name, Action<TextChannelProperties> func, RequestOptions options) | |||||
=> await CreateTextChannelAsync(name, func, options).ConfigureAwait(false); | |||||
async Task<IVoiceChannel> IGuild.CreateVoiceChannelAsync(string name, Action<VoiceChannelProperties> func, RequestOptions options) | |||||
=> await CreateVoiceChannelAsync(name, func, options).ConfigureAwait(false); | |||||
async Task<ICategoryChannel> IGuild.CreateCategoryAsync(string name, RequestOptions options) | async Task<ICategoryChannel> IGuild.CreateCategoryAsync(string name, RequestOptions options) | ||||
=> await CreateCategoryChannelAsync(name, options).ConfigureAwait(false); | => await CreateCategoryChannelAsync(name, options).ConfigureAwait(false); | ||||
@@ -315,9 +315,9 @@ namespace Discord.WebSocket | |||||
=> GetChannel(id) as SocketTextChannel; | => GetChannel(id) as SocketTextChannel; | ||||
public SocketVoiceChannel GetVoiceChannel(ulong id) | public SocketVoiceChannel GetVoiceChannel(ulong id) | ||||
=> GetChannel(id) as SocketVoiceChannel; | => GetChannel(id) as SocketVoiceChannel; | ||||
public Task<RestTextChannel> CreateTextChannelAsync(string name, RequestOptions options = null, Action<TextChannelProperties> func = null) | |||||
public Task<RestTextChannel> CreateTextChannelAsync(string name, Action<TextChannelProperties> func = null, RequestOptions options = null) | |||||
=> GuildHelper.CreateTextChannelAsync(this, Discord, name, options, func); | => GuildHelper.CreateTextChannelAsync(this, Discord, name, options, func); | ||||
public Task<RestVoiceChannel> CreateVoiceChannelAsync(string name, RequestOptions options = null, Action<VoiceChannelProperties> func = null) | |||||
public Task<RestVoiceChannel> CreateVoiceChannelAsync(string name, Action<VoiceChannelProperties> func = null, RequestOptions options = null) | |||||
=> GuildHelper.CreateVoiceChannelAsync(this, Discord, name, options, func); | => GuildHelper.CreateVoiceChannelAsync(this, Discord, name, options, func); | ||||
public Task<RestCategoryChannel> CreateCategoryChannelAsync(string name, RequestOptions options = null) | public Task<RestCategoryChannel> CreateCategoryChannelAsync(string name, RequestOptions options = null) | ||||
=> GuildHelper.CreateCategoryChannelAsync(this, Discord, name, options); | => GuildHelper.CreateCategoryChannelAsync(this, Discord, name, options); | ||||
@@ -678,10 +678,10 @@ namespace Discord.WebSocket | |||||
=> Task.FromResult<IGuildChannel>(EmbedChannel); | => Task.FromResult<IGuildChannel>(EmbedChannel); | ||||
Task<ITextChannel> IGuild.GetSystemChannelAsync(CacheMode mode, RequestOptions options) | Task<ITextChannel> IGuild.GetSystemChannelAsync(CacheMode mode, RequestOptions options) | ||||
=> Task.FromResult<ITextChannel>(SystemChannel); | => Task.FromResult<ITextChannel>(SystemChannel); | ||||
async Task<ITextChannel> IGuild.CreateTextChannelAsync(string name, RequestOptions options, Action<TextChannelProperties> func) | |||||
=> await CreateTextChannelAsync(name, options, func).ConfigureAwait(false); | |||||
async Task<IVoiceChannel> IGuild.CreateVoiceChannelAsync(string name, RequestOptions options, Action<VoiceChannelProperties> func) | |||||
=> await CreateVoiceChannelAsync(name, options, func).ConfigureAwait(false); | |||||
async Task<ITextChannel> IGuild.CreateTextChannelAsync(string name, Action<TextChannelProperties> func, RequestOptions options) | |||||
=> await CreateTextChannelAsync(name, func, options).ConfigureAwait(false); | |||||
async Task<IVoiceChannel> IGuild.CreateVoiceChannelAsync(string name, Action<VoiceChannelProperties> func, RequestOptions options) | |||||
=> await CreateVoiceChannelAsync(name, func, options).ConfigureAwait(false); | |||||
async Task<ICategoryChannel> IGuild.CreateCategoryAsync(string name, RequestOptions options) | async Task<ICategoryChannel> IGuild.CreateCategoryAsync(string name, RequestOptions options) | ||||
=> await CreateCategoryChannelAsync(name, options).ConfigureAwait(false); | => await CreateCategoryChannelAsync(name, options).ConfigureAwait(false); | ||||