Skip to content

Commit

Permalink
fix: resolve breaking change
Browse files Browse the repository at this point in the history
Signed-off-by: Octol1ttle <[email protected]>
  • Loading branch information
Octol1ttle committed May 30, 2024
1 parent 7802ad2 commit c4e3744
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions TeamOctolings.Octobot/Extensions/ChannelApiExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,19 @@ public static class ChannelApiExtensions
public static async Task<Result> CreateMessageWithEmbedResultAsync(this IDiscordRestChannelAPI channelApi,
Snowflake channelId, Optional<string> message = default, Optional<string> nonce = default,
Optional<bool> isTextToSpeech = default, Optional<Result<Embed>> embedResult = default,
Optional<IAllowedMentions> allowedMentions = default, Optional<IMessageReference> messageRefenence = default,
Optional<IAllowedMentions> allowedMentions = default, Optional<IMessageReference> messageReference = default,
Optional<IReadOnlyList<IMessageComponent>> components = default,
Optional<IReadOnlyList<Snowflake>> stickerIds = default,
Optional<IReadOnlyList<OneOf<FileData, IPartialAttachment>>> attachments = default,
Optional<MessageFlags> flags = default, CancellationToken ct = default)
Optional<MessageFlags> flags = default, Optional<bool> enforceNonce = default,
Optional<IPollCreateRequest> poll = default, CancellationToken ct = default)
{
if (!embedResult.IsDefined() || !embedResult.Value.IsDefined(out var embed))
{
return ResultExtensions.FromError(embedResult.Value);
}

return (Result)await channelApi.CreateMessageAsync(channelId, message, nonce, isTextToSpeech, new[] { embed },
allowedMentions, messageRefenence, components, stickerIds, attachments, flags, ct);
allowedMentions, messageReference, components, stickerIds, attachments, flags, enforceNonce, poll, ct);
}
}

0 comments on commit c4e3744

Please sign in to comment.