Open thatbirdguythatuknownot opened 6 months ago
There's quite a lot of features of this bot that interact with codeblocks, so this issue doesn't give us much to go off of for potentially fixing what you believe to be incorrect.
Could you specify where we should special case this count?
It might be easier if you provide reproduction steps, what the expected behaviour is, and what the current behaviour is.
If you believe this is an exploitable bug and shouldn't be discussed publicly, please follow our security notice
There was recently an incident with spam in #python-discussion where a user sent a lot of backticks that turned into codeblocks that flooded the chat. I think the relevant code is here.
So just to be clear then, this issue is related to the new lines filter potentially not working correctly for messages with backticks?
If so, could you update the original description & title to reflect that?
Yup.
Due to a recent incident, it is very important to note the need to special-case codeblocks' newline count for the antispam filter. It is important to note that, as shown in the image, a codeblock renders about 2 extra lines worth of space compared to a regular text line. It is also recommended to special-case headers, as they make text a lot larger than usual (although I haven't computed it yet).