Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please Make a burst mode optional. #92

Closed
ghost opened this issue Apr 24, 2021 · 13 comments
Closed

Please Make a burst mode optional. #92

ghost opened this issue Apr 24, 2021 · 13 comments
Labels
enhancement New feature or request wontfix This will not be worked on

Comments

@ghost
Copy link

ghost commented Apr 24, 2021

Is your feature request related to a problem? Please describe.

Sometimes Telegram Account Limited Error occurs. As you know, telegram Account Limited Error is an error which happens when an account sends many messages at once. This does not cause any permanent issues with the account. But When this error happens tgcf will not send any more messages via the account. (Temporary wait limit)

Describe the solution you'd like

It would be very helpful if you provided message rate options.

example : [burst mode - High or Low]

It will be able to reduce the frequency of occurrence of the telegram Account Limited Error.

Describe alternatives you've considered

Alternatively, it would be fine to be able to set the interval between sending messages in seconds.

example: sent every [10] seconds

Thank you! This project is evolving every day.

@ghost ghost added the enhancement New feature or request label Apr 24, 2021
@ghost ghost changed the title controls message rate for tgcf Please Make a burst mode option. Apr 24, 2021
@ghost ghost changed the title Please Make a burst mode option. Please Make a burst mode optional. Apr 24, 2021
@aahnik aahnik added the wontfix This will not be worked on label Apr 26, 2021
@aahnik
Copy link
Owner

aahnik commented Apr 26, 2021

read this https://github.com/aahnik/tgcf/wiki/Flood-wait-errors-and-bans and #90 (comment)

let flood wait errors occur. when they occur tgcf waits and then resumes.

why create an artificial delay when not required ?

you are saying to send every 10 seconds, that will take more time to complete the entire thing. i am not interested in going that way.

when the rate limit is reached, then wait, and then continue. that's the philosophy of tgcf

@aahnik aahnik closed this as completed Apr 26, 2021
@ghost
Copy link
Author

ghost commented Apr 26, 2021

Thank you. You are right.

@aahnik
Copy link
Owner

aahnik commented Apr 26, 2021

Hi @comienzo2093 , are you replying from email?

why so much Chinese text here?

image

please use English as the medium of communication 🙏

@tissole
Copy link

tissole commented Apr 26, 2021

I want to comment on this issue. I think a big concern that is on everyone’s mind is that TG will consider the number of messages forwarded as spam and start banning accounts. So without triggering the flood warning the risk will disappear.

I agree that the script must be fast. But maybe applying some limits will make it even faster. I know is a bit counterintuitive but hear me out.

Currently, the script takes about 10 minutes to forward ~2000 messages and then stops and waits approx. 50 minutes (limit imposed by TG). So in 1 hour can forward 2000 messages. In a day the script can forward ~2000x24=~48.000 messages. For that, it works 10 minutes every hour so in 24 hours works 240 minutes ~4 hours. So the vast majority of time is spent waiting.

According to this source TG allows 1 message per second. Currently, the script's speed is ~3.3 messages per second. If the rate is lowered to 1msg/s it will forward 3600 msg/s and ~86.000 msg/day, more than currently does, because even if will forwarding slower it will not waits.

Maybe give it a try, make a test build so we can play with it and see the results.

@ghost
Copy link
Author

ghost commented Apr 26, 2021

Hi @comienzo2093 , are you replying from email?

why so much Chinese text here?

please use English as the medium of communication 🙏

Oh, I used Google Translate and it was written in Korean by mistake. Ok, I will use English!

@aahnik
Copy link
Owner

aahnik commented Apr 26, 2021

hi @tissole , thank you for your ideas. I will definitely think about this.

@ghost
Copy link
Author

ghost commented Apr 26, 2021

I agree with your opinion. (when they occur tgcf waits and then resumes)

I forwarded over 20000 messages with tgcf today, and it was okay!
I will continue testing in the future and report the results once I get enough data.

Also, I created a bot, and then tested bulk message forwarding with bot account. I thought bot login is a good alternative,
Because with the bot I don't even have to worry about whether or not this account limit exists.

By the way, there were some problems.
when the chat was posted to the source at a high rate, the bot didn't seem to be able to handle this.
After forwarding about 20 chats per minute, It stopped.
Of course Stopping didn't matter. Because it will resume if I wait.
But the problem is that some messages were not forwarded. (Skipped)

I discovered this a while ago. After testing several times under controlled conditions, I will post again about this.
In addition, your project is literally amazing. Thank you.

@aahnik
Copy link
Owner

aahnik commented May 1, 2021

hi @comienzo2093, the rate limit of bot is lower.

Telegram allows less no of messages to be sent by the bot account per minute

so I don't think this can be solved.

@ghost
Copy link
Author

ghost commented May 2, 2021

hi @comienzo2093, the rate limit of bot is lower.

Telegram allows less no of messages to be sent by the bot account per minute

so I don't think this can be solved.

Yes, thank you for your answer. I understood your answer.

And I am testing tgcf with 5 accounts, only 1 account is blocked.
I was continuing to chat manually without noticing that my telegram account was in the'Temporary wait limit' state, and my account was suddenly blocked.

This was my mistake. I should be careful when chatting while using tgcf.
Other than that, I tested with more than 140,000 forwardings, but there was no account block.

@tissole
Copy link

tissole commented May 2, 2021

@comienzo2093, hmm interesting! Could you give more detail about the account blocked? Was it a new account or an old one? Did you use a normal SIM number phone or virtual number? If it possible can you say from what country? How many messages did you forward before it was blocked? It is a temporary ban or the account is gone forever? Did you talk with Telegram support?

@aahnik
This site shows the different limits on Telegram. It says
Message forwarding
up to 2,000 per hour
This is what I observed when using the script. So maybe the limit is per hour, in this case limiting the rate to match this limit will resolve the flood alerts (1.8 msg/h). Or limiting the script to only forward 2000 msg and then to stop till 1 hour passes so as to not trigger the flood alerts.

@ghost
Copy link
Author

ghost commented May 3, 2021

@tissole

Was it a new account or an old one?

  • It was a newly created account a few days ago.

Did you use a normal SIM number phone or virtual number?

  • Four were virtual numbers, and one was a real number account using a sim. The blocked account was an account with a virtual number, but it is not clear if it is related to the account block.

If it possible can you say from what country?

  • South Korea. However, all my virtual numbers were US (+1) numbers.

How many messages did you forward before it was blocked?

  • I forwarded about 30,000 with that account, and forwarding was still in progress. I had to wait 2800s for the next transfer, but I forgot it and were chatting in a group.
    Eventually my account was suddenly blocked during chat.

It is a temporary ban or the account is gone forever?

  • It was a permanent limitation. In my opinion,Telegram seems to have stricter standards for accounts with virtual numbers. I was blocked without a single warning(Of course, I received 'flood wait errors' message through the tgcf console), and I couldn't even log in to that account.

Did you talk with Telegram support?

  • I didn't. I just created a new account again. Because, for me, getting an account blocked is not a big deal. I forwarded messages to another my account. (As you know, if you forwarded directly from A to account B, Even if account A is blocked, you can still see forwarded messages in account B)
    This was the method I chose because I don't know about the block policy of my Telegram account.

@tissole
Copy link

tissole commented May 3, 2021

Thank you for the detailed answer. It is very helpful to know what triggers these bans. Another user account was banned in the same conditions: new account and a big number of forwards in a short time.

Another element that seems to trigger the bans is the type of phone number. From Telegram:
"Some numbers may trigger an overly harsh response from our system, either due to their previous owners‘ activities or due to them being certain virtual/VOIP numbers. We’re sorry if this resulted in your account being limited for no reason.
If you think this is your case, please contact @SpamBot and tell it your story."

Till now, 3 factors seem to play a role in the bans:

  • a new account
  • a VoIP number
  • big number of forwards in a short period of time

So a prudent approach is to use an old account, a SIM number, and to progressively increase the number of forwards over time. The definitive solution is to prevent altogether these flood messages to occur because these trigger the automation system put in place by TG. Now the limit seems to be 2000 msg/hour, so obeying this limit probably will secure the account in the future.

I want to ask you one more thing. Please write to TG @SpamBot and be honest, tell them that you use a script to forward some messages to your channel. At least we will know the TG policy about these scripts and if they lift the ban (I heard that the ban is temporary 24-72 hours). Probably the TG systems confuse the big number of flood msg from an account with a spamming activity.

@aahnik aahnik added wontfix This will not be worked on and removed wontfix This will not be worked on labels May 5, 2021
Repository owner locked as resolved and limited conversation to collaborators May 6, 2021
@aahnik
Copy link
Owner

aahnik commented May 6, 2021

hi @tissole this #92 (comment) logic is not correct.

if i get time, I will explain in detail later.

and stop worrying about rate limits. all apis impose rate limit. that is enforced from the backend server. all these workarounds are useless.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants