/// <exception cref="InvalidOperationException">Only the author of a message may modify the message.</exception>
/// <exception cref="ArgumentOutOfRangeException">Message content is too long, length must be less or equal to <see cref="DiscordConfig.MaxMessageSize"/>.</exception>
public static async Task<Model> ModifyAsync(IMessage msg, BaseDiscordClient client, Action<MessageProperties> func,
@@ -112,9 +122,6 @@ namespace Discord.Rest
int index = 0;
var codeIndex = 0;
var inlineRegex = new Regex(@"[^\\]?(`).+?[^\\](`)", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline);
var blockRegex = new Regex(@"[^\\]?(```).+?[^\\](```)", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline);
// checks if the tag being parsed is wrapped in code blocks
bool CheckWrappedCode()
{
@@ -125,7 +132,7 @@ namespace Discord.Rest
// loop through all code blocks that are before the start of the tag
while (codeIndex < index)
{
var blockMatch = blockRegex.Match(text, codeIndex);
var blockMatch = BlockCodeRegex.Match(text, codeIndex);
if (blockMatch.Success)
{
if (EnclosedInBlock(blockMatch))
@@ -136,7 +143,7 @@ namespace Discord.Rest
continue;
return false;
}
var inlineMatch = inlineRegex.Match(text, codeIndex);
var inlineMatch = InlineCodeRegex.Match(text, codeIndex);
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.