style: move root namespace to TeamOctolings.Octobot
This commit is contained in:
parent
19fadead91
commit
3e6240f4b8
61 changed files with 421 additions and 441 deletions
|
@ -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);
|
||||
}
|
||||
}
|
Reference in a new issue