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

issue tiwh #1408

Open
3 tasks done
nowomann0cry opened this issue Mar 26, 2024 · 0 comments
Open
3 tasks done

issue tiwh #1408

nowomann0cry opened this issue Mar 26, 2024 · 0 comments

Comments

@nowomann0cry
Copy link

Checklist

  • I am sure the error is coming from Pyrogram's code and not elsewhere
  • I have searched in the issue tracker for similar bug reports, including closed ones
  • I ran pip3 install -U https://github.com/pyrogram/pyrogram/archive/master.zip and reproduced the issue using the latest development version

Description

(https://i.stack.imgur.com/Jpihw.png)
Hello, there is the following problem, Telegram blocks an account when it reports a channel for distributing drugs, if the accounts are less than a month old and they were used purely for testing the report.

We tried to do this in telethon, but there is no way to automate authorization.

how can i solve this problem

Steps to reproduce

try to automate sending a complaint to a specific group in telegram

Code example

with app:
    try:
        peer = app.resolve_peer("xxxxxxxx")
        print(peer)
        peer_id = peer.channel_id
        access_hash = peer.access_hash

        channel = InputPeerChannel(channel_id=peer_id, access_hash=access_hash)
        reason = InputReportReasonIllegalDrugs()

        report_peer = ReportPeer(
            peer=channel, 
            reason=reason, 
            message="text"
        )
        report = app.invoke(report_peer)
        print(report)

Logs

when I run the program for the second time with the same account, I get a 401 error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant