feat: add message update handler
This commit is contained in:
parent
14b132e466
commit
8231c57bdf
3 changed files with 159 additions and 0 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue