I think I managed to debug the problem. This is what I got as reply from the server when the message failed:
Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host
I googled it, and they said to add the line
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
(I did it and didn’t work, still skips some messages)
But since that topic is old, they said after that its not longer necessary to write that on NetFramework 4.6, which is guess what, It’s what I used for the bot for all these months.
So back to the point: the code is correct and it does what he wants without a reason, basically. I will pay anyone who can help me.