1
0
Fork 1
mirror of https://github.com/TeamOctolings/Octobot.git synced 2025-05-02 20:19:55 +03:00

style: move root namespace to TeamOctolings.Octobot

This commit is contained in:
Octol1ttle 2024-05-16 18:11:01 +05:00
parent 19fadead91
commit 3e6240f4b8
Signed by: Octol1ttle
GPG key ID: B77C34313AEE1FFF
61 changed files with 421 additions and 441 deletions

View file

@ -0,0 +1,21 @@
using Remora.Discord.API.Objects;
using Remora.Discord.Commands.Feedback.Messages;
using Remora.Discord.Commands.Feedback.Services;
using Remora.Results;
namespace TeamOctolings.Octobot.Extensions;
public static class FeedbackServiceExtensions
{
public static async Task<Result> SendContextualEmbedResultAsync(
this IFeedbackService feedback, Result<Embed> embedResult,
FeedbackMessageOptions? options = null, CancellationToken ct = default)
{
if (!embedResult.IsDefined(out var embed))
{
return ResultExtensions.FromError(embedResult);
}
return (Result)await feedback.SendContextualEmbedAsync(embed, options, ct);
}
}