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:
parent
b8232bf743
commit
c7bcf28838
1 changed files with 1 additions and 6 deletions
|
@ -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;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue