Giter Club home page Giter Club logo

Comments (4)

delivrance avatar delivrance commented on May 3, 2024

Hi there! Nope, is not possible to get the id/hash pair for private chats or channels via the joinchat link without joining first, all you can do is using messages.CheckChatInvite to get a brief description. You have to pass only the link hash as argument, which is GG4BlQwm19czcBGOewv40Q in your example.

However, if the chat/channel is public (i.e., you have its public username), you can get the id/hash pair by using contacts.ResolveUsername.

Edit: If the channel/group is public and all you have is just an invite link, you can use messages.CheckChatInvite to get the id/hash pair. The returned type will be types.ChatInviteAlready in this case, instead of types.ChatInvite

from pyrogram.

ksanderer avatar ksanderer commented on May 3, 2024

Thanks! Will try!

Telethon has sugar method get_entity. It is quite handy for the current case.

http://telethon.readthedocs.io/en/latest/extra/basic/entities.html?highlight=get_entity#getting-entities

from pyrogram.

delivrance avatar delivrance commented on May 3, 2024

@ksanderer Thanks. New features/ideas are surely welcome and being Pyrogram pretty young there's a lot of room for improvements.

from pyrogram.

Morrigan-Ship avatar Morrigan-Ship commented on May 3, 2024

i

Hi there! Nope, is not possible to get the id/hash pair for private chats or channels via the joinchat link without joining first

bot joined
how can i do it via custom invite link?

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.