feature: optional API calling to RestInteraction (#2281)

* Take 2

* Expose channel & guild Id for manual calling

* Make api calling optional at runtime

* Resolve build errors

* Bind runtime option to interaction type

* Expose methods to get channel & guild from API

* Patch out NRE's, test on all int types
This commit is contained in:
Armano den Boef
2022-05-18 09:56:57 +02:00
committed by GitHub
parent 20bd2e9e2f
commit a24dde4b19
17 changed files with 212 additions and 79 deletions

View File

@@ -18,10 +18,10 @@ namespace Discord.Rest
{
}
internal static new async Task<RestPingInteraction> CreateAsync(DiscordRestClient client, Model model)
internal static new async Task<RestPingInteraction> CreateAsync(DiscordRestClient client, Model model, bool doApiCall)
{
var entity = new RestPingInteraction(client, model.Id);
await entity.UpdateAsync(client, model);
await entity.UpdateAsync(client, model, doApiCall);
return entity;
}