internal CachedOverwrite(DiscordClient client, OverwriteModel model, CachedGuildChannel channel) : base(client, model.Id) { Channel = channel; TargetId = model.Id; Permissions = (model.Allow, model.Deny); TargetType = model.Type; }
internal RestOverwrite(RestDiscordClient client, OverwriteModel model, Snowflake channelId) : base(client) { ChannelId = channelId; Channel = new RestDownloadable <RestGuildChannel>(options => Client.GetChannelAsync <RestGuildChannel>(channelId, options)); TargetId = model.Id; Permissions = (model.Allow, model.Deny); TargetType = model.Type; }
internal RestOverwrite(RestDiscordClient client, Snowflake channelId, OverwriteModel model) : base(client) { ChannelId = channelId; Channel = RestFetchable.Create(this, (@this, options) => @this.Client.GetChannelAsync <RestGuildChannel>(@this.ChannelId, options)); TargetId = model.Id; Permissions = (model.Allow, model.Deny); TargetType = model.Type; }
public LocalOverwrite(IRole target, OverwritePermissions permissions) { if (target == null) { throw new ArgumentNullException(nameof(target)); } TargetId = target.Id; TargetType = OverwriteTargetType.Role; Permissions = permissions; }
public LocalOverwrite(Snowflake targetId, OverwriteTargetType targetType, OverwritePermissions permissions) { TargetId = targetId; TargetType = targetType; Permissions = permissions; }