gramjs icon indicating copy to clipboard operation
gramjs copied to clipboard

getFullChat returns error

Open StasTikh opened this issue 2 years ago • 6 comments

Hello! First of all, thanks for your work, it’s very useful. I have a problem. Trying to use getFullChat method. When chat_id has 9 digits, it works. But if chat_id has 10 numbers and starts with “1”, I’m getting an error “chat if invalid”. What can be a problem? Thanks

StasTikh avatar Jun 07 '22 19:06 StasTikh

getFullChat is only for small chats, if you want to use something on supergroup use https://gram.js.org/tl/channels/GetFullChannel#channelsgetfullchannel

painor avatar Jun 07 '22 19:06 painor

getFullChat is only for small chats, if you want to use something on supergroup use https://gram.js.org/tl/channels/GetFullChannel#channelsgetfullchannel

Thanks, I tried this method too. Same story

StasTikh avatar Jun 07 '22 19:06 StasTikh

can you share your code?

painor avatar Jun 07 '22 21:06 painor

yes, of course. (async function run() { await client.connect(); const result = await client.invoke( new Api.channels.GetFullChannel({ channel: "1247153954" }) ); console.log(result); })(); and i've got an error: "Error: Could not find the input entity for {"userId":"1247153954","className":"PeerUser"}."

StasTikh avatar Jun 08 '22 06:06 StasTikh

1247153954 is a user's ID. use -1001247153954

painor avatar Jun 08 '22 09:06 painor

1247153954 is a user's ID. use -1001247153954

thanks! but i got only my data in userrs array. or vevn an empty array

StasTikh avatar Jun 08 '22 13:06 StasTikh