api: [brk] Move Invites-related Methods from IGuildChannel to INestedChannel (#1172)
* Move invites-related methods from IGuildChannel to INestedChannel * Add missing implementation ...because I somehow forgot it the first time around
This commit is contained in:
@@ -57,8 +57,17 @@ namespace Discord.Rest
|
||||
/// </returns>
|
||||
public Task<ICategoryChannel> GetCategoryAsync(RequestOptions options = null)
|
||||
=> ChannelHelper.GetCategoryAsync(this, Discord, options);
|
||||
|
||||
public Task SyncPermissionsAsync(RequestOptions options = null)
|
||||
=> ChannelHelper.SyncPermissionsAsync(this, Discord, options);
|
||||
|
||||
//Invites
|
||||
/// <inheritdoc />
|
||||
public async Task<IInviteMetadata> CreateInviteAsync(int? maxAge = 86400, int? maxUses = null, bool isTemporary = false, bool isUnique = false, RequestOptions options = null)
|
||||
=> await ChannelHelper.CreateInviteAsync(this, Discord, maxAge, maxUses, isTemporary, isUnique, options).ConfigureAwait(false);
|
||||
/// <inheritdoc />
|
||||
public async Task<IReadOnlyCollection<IInviteMetadata>> GetInvitesAsync(RequestOptions options = null)
|
||||
=> await ChannelHelper.GetInvitesAsync(this, Discord, options).ConfigureAwait(false);
|
||||
|
||||
private string DebuggerDisplay => $"{Name} ({Id}, Voice)";
|
||||
|
||||
@@ -77,6 +86,7 @@ namespace Discord.Rest
|
||||
=> AsyncEnumerable.Empty<IReadOnlyCollection<IGuildUser>>();
|
||||
|
||||
// INestedChannel
|
||||
/// <inheritdoc />
|
||||
async Task<ICategoryChannel> INestedChannel.GetCategoryAsync(CacheMode mode, RequestOptions options)
|
||||
{
|
||||
if (CategoryId.HasValue && mode == CacheMode.AllowDownload)
|
||||
|
||||
Reference in New Issue
Block a user