gramjs icon indicating copy to clipboard operation
gramjs copied to clipboard

How to use with proxies?

Open Nafidinara opened this issue 3 years ago • 3 comments

Hello, thanks for making this, In case I need to sendMessage to 100 users in a day, but when I run client.sendMessage(), when it just 5 users sended, Im getting this error RPCError: 400: PEER_FLOOD (caused by messages.SendMessage). I think I need to use proxies to prevent this limitation. Can you give me reference how to use it? Thanks!

Nafidinara avatar Apr 30 '22 17:04 Nafidinara

PEER_FLOOD is related to the account that makes the request not the IP.

even if you used proxies it would not change the error.

in any case if you want to use proxies use https://gram.js.org/getting-started/authorization#using-mtproxies-and-socks5-proxies

painor avatar Apr 30 '22 18:04 painor

ok sir @painor , so any suggestion to prevent that PEER_FLOOD? cause I had to send 100 message in one time, using many session?

Nafidinara avatar Apr 30 '22 18:04 Nafidinara

not really. this is an anti spam filter by telegram. They do not want people to send 100 messages. Maybe try using bots instead of users.

painor avatar Apr 30 '22 20:04 painor