feat: add message update handler

This commit is contained in:
sam 2024-08-16 00:51:19 +02:00
parent 14b132e466
commit 8231c57bdf
Signed by: sam
GPG key ID: 5F3C3C1B3166639D
3 changed files with 159 additions and 0 deletions

View file

@ -50,6 +50,9 @@ public static class DiscordExtensions
return result.Entity;
}
public static T GetOrThrow<T>(this Optional<T> optional) =>
optional.OrThrow(() => new CataloggerError("Optional<T> was unset"));
public static async Task<T> GetOrThrow<T>(this Task<Result<T>> result) => (await result).GetOrThrow();
public static async Task<Result> UpdateMessageAsync(this IDiscordRestInteractionAPI interactionApi,