public async Task AddPermissionOverwriteAsync(IUser user, OverwritePermissions perms, RequestOptions options = null) { await ChannelHelper.AddPermissionOverwriteAsync(this, Discord, user, perms, options).ConfigureAwait(false); _overwrites = _overwrites.Add(new Overwrite(user.Id, PermissionTarget.User, new OverwritePermissions(perms.AllowValue, perms.DenyValue))); }
public Task AddPermissionOverwriteAsync(IRole role, OverwritePermissions perms, RequestOptions options = null) => ChannelHelper.AddPermissionOverwriteAsync(this, Discord, role, perms, options);
/// <summary> /// Adds or updates the permission overwrite for the given role. /// </summary> /// <param name="role">The role to add the overwrite to.</param> /// <param name="permissions">The overwrite to add to the role.</param> /// <param name="options">The options to be used when sending the request.</param> /// <returns> /// A task representing the asynchronous permission operation for adding the specified permissions to the channel. /// </returns> public virtual async Task AddPermissionOverwriteAsync(IRole role, OverwritePermissions permissions, RequestOptions options = null) { await ChannelHelper.AddPermissionOverwriteAsync(this, Discord, role, permissions, options).ConfigureAwait(false); _overwrites = _overwrites.Add(new Overwrite(role.Id, PermissionTarget.Role, new OverwritePermissions(permissions.AllowValue, permissions.DenyValue))); }
/// <summary> /// Adds or updates the permission overwrite for the given role. /// </summary> /// <param name="role">The role to add the overwrite to.</param> /// <param name="permissions">The overwrite to add to the role.</param> /// <param name="options">The options to be used when sending the request.</param> /// <returns> /// A task representing the asynchronous permission operation for adding the specified permissions to the channel. /// </returns> public virtual async Task AddPermissionOverwriteAsync(IRole role, OverwritePermissions permissions, RequestOptions options = null) { await ChannelHelper.AddPermissionOverwriteAsync(this, Discord, role, permissions, options).ConfigureAwait(false); }