Exemplo n.º 1
0
        internal new static async Task <RestMessageCommandData> CreateAsync(DiscordRestClient client, Model model, RestGuild guild, IRestMessageChannel channel, bool doApiCall)
        {
            var entity = new RestMessageCommandData(client, model);
            await entity.UpdateAsync(client, model, guild, channel, doApiCall).ConfigureAwait(false);

            return(entity);
        }
        internal override async Task UpdateAsync(DiscordRestClient client, Model model)
        {
            await base.UpdateAsync(client, model).ConfigureAwait(false);

            var dataModel = model.Data.IsSpecified
                ? (DataModel)model.Data.Value
                : null;

            Data = await RestMessageCommandData.CreateAsync(client, dataModel, Guild, Channel).ConfigureAwait(false);
        }