Git Product home page Git Product logo

Comments (12)

delivrance avatar delivrance commented on May 7, 2024

Post what you've tried so far.

from pyrogram.

akash-sengar avatar akash-sengar commented on May 7, 2024

ch = client.send(
functions.channels.GetChannels(types.InputChannelEmpty)
)

ch = client.send(
functions.channels.GetChannels(types.InputChannelEmpty())
)

ch = client.send(
functions.channels.GetChannels([types.InputChannelEmpty])
)

ch = client.send(
functions.channels.GetChannels([types.InputChannelEmpty()])
)

I have tried this methods and few more. Some gives error 500, invalid user name, etc.

from pyrogram.

akash-sengar avatar akash-sengar commented on May 7, 2024

Please suggest me a way to get all chats from all groups in my account

from pyrogram.

delivrance avatar delivrance commented on May 7, 2024

You seem to be a bit confused if you've tried all those combinations (the semantically correct one is number 4).

Anyway, here's an example on how to get participants, given a target supergroup: https://github.com/pyrogram/pyrogram/blob/master/examples/get_participants2.py
You need at least a username, a chat_id or a joinchat link of the supergroup/channel.

from pyrogram.

akash-sengar avatar akash-sengar commented on May 7, 2024

is their any way to get all target names from api?

from pyrogram.

delivrance avatar delivrance commented on May 7, 2024

Yes, messages.GetDialogs.

from pyrogram.

akash-sengar avatar akash-sengar commented on May 7, 2024

Sir, what should be the offset_id and also what should be the format of offset_date and what should we do to get all information from starting

from pyrogram.

delivrance avatar delivrance commented on May 7, 2024

Look at how get_dialogs() is implemented, in particular: https://github.com/pyrogram/pyrogram/blob/master/pyrogram/client/client.py#L891-L915

If you just want to get the IDs of all your dialogs you can get them from client.peers_by_id. Pyrogram already fetches all the dialogs when it starts.

from pyrogram.

akash-sengar avatar akash-sengar commented on May 7, 2024

Thanks sir, I will test it and give you the update

from pyrogram.

delivrance avatar delivrance commented on May 7, 2024

@darkknight2206 Maybe you want to join the group for such questions and discuss there instead: @PyrogramChat

from pyrogram.

themusharraf avatar themusharraf commented on May 7, 2024

How can I create groups whose users have subscribed to in pyrogram?

from pyrogram.

themusharraf avatar themusharraf commented on May 7, 2024

@delivrance I would be very happy if you could provide information on this question

from pyrogram.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.