Fix NRE on commandbase data assignment (#2414)

This commit is contained in:
Armano den Boef
2022-08-04 11:05:22 +02:00
committed by GitHub
parent e551431d72
commit 02bc3b7977

View File

@@ -49,6 +49,9 @@ namespace Discord.Rest
internal override async Task UpdateAsync(DiscordRestClient client, Model model, bool doApiCall)
{
await base.UpdateAsync(client, model, doApiCall).ConfigureAwait(false);
if (model.Data.IsSpecified && model.Data.Value is RestCommandBaseData data)
Data = data;
}
/// <summary>