1
0
Fork 1
mirror of https://github.com/TeamOctolings/Octobot.git synced 2025-04-19 16:33:36 +03:00

can't rent arrays with length 1 in ohio

This commit is contained in:
Octol1ttle 2023-12-17 21:43:55 +05:00
parent b8232bf743
commit c7bcf28838
Signed by: Octol1ttle
GPG key ID: B77C34313AEE1FFF

View file

@ -24,12 +24,7 @@ public static class ChannelApiExtensions
return Result.FromError(embedResult.Value); return Result.FromError(embedResult.Value);
} }
var rented = ArrayPool<Embed>.Shared.Rent(1); return (Result)await channelApi.CreateMessageAsync(channelId, message, nonce, isTextToSpeech, new[] { embed },
rented[0] = embed;
var result = (Result)await channelApi.CreateMessageAsync(channelId, message, nonce, isTextToSpeech, rented,
allowedMentions, messageRefenence, components, stickerIds, attachments, flags, ct); allowedMentions, messageRefenence, components, stickerIds, attachments, flags, ct);
ArrayPool<Embed>.Shared.Return(rented);
return result;
} }
} }