internal static RestInternalWebhook Create(DiscordWebhookClient client, Model model) { var entity = new RestInternalWebhook(client, model); entity.Update(model); return(entity); }
internal RestInternalWebhook(DiscordWebhookClient apiClient, Model model) { _client = apiClient; Id = model.Id; ChannelId = model.Id; Token = model.Token; }
internal static RestWebhook Create(BaseDiscordClient discord, IGuild guild, Model model) { var entity = new RestWebhook(discord, guild, model.Id, model.Token, model.ChannelId); entity.Update(model); return(entity); }
internal void Update(Model model) { if (ChannelId != model.ChannelId) { ChannelId = model.ChannelId; } if (model.Avatar.IsSpecified) { AvatarId = model.Avatar.Value; } if (model.Creator.IsSpecified) { Creator = RestUser.Create(Discord, model.Creator.Value); } if (model.GuildId.IsSpecified) { GuildId = model.GuildId.Value; } if (model.Name.IsSpecified) { Name = model.Name.Value; } ApplicationId = model.ApplicationId; }
internal void Update(Model model) { if (model.Avatar.IsSpecified) { AvatarId = model.Avatar.Value; } if (model.GuildId.IsSpecified) { GuildId = model.GuildId.Value; } if (model.Name.IsSpecified) { Name = model.Name.Value; } }
internal void Update(Model model) { if (model.Avatar.IsSpecified) { AvatarId = model.Avatar.Value; } if (model.Creator.IsSpecified) { Creator = RestUser.Create(Discord, model.Creator.Value); } if (model.GuildId.IsSpecified) { GuildId = model.GuildId.Value; } if (model.Name.IsSpecified) { Name = model.Name.Value; } }
internal void Update(Model model) { if (ChannelId != model.ChannelId) { ChannelId = model.ChannelId; } if (model.Avatar.IsSpecified) { AvatarId = model.Avatar.Value; } if (model.GuildId.IsSpecified) { GuildId = model.GuildId.Value; } if (model.Name.IsSpecified) { Name = model.Name.Value; } ApplicationId = model.ApplicationId; }