Closed waptik closed 1 year ago
When i try to use other methods, i get the error below
Duplicate of #31, @spechide?
Duplicate of #31, @SpEcHiDe?
According to your response in that issue, you mentioned it being a bot-only issue. But this problem persists again when i use a user client.
I decided to use StoreSession
and the problem stops persisting after first success. When using StringSession, the problem will continue even after the first success when the server restarts.
@waptik Your problem aside, do you know that the channels.GetParticipants
method is not available for bots?
@waptik Your problem aside, do you know that the
channels.GetParticipants
method is not available for bots?
I don't. Because it didn't work with user clients that's why I had to try with bot client.
So I found a solution about it in gramjs telegram group which says I should use client.getParticipants
and that worked.
Hi. So i'm trying to use this library with grammy.dev but i don't know how to go about it. So i'm trying to get all participants(users) in a group where i & the bot are both members and admins and i created a test group to try it out. I'm using a middleware to listen to all text messages and get the users
the middleware
```ts const composer = new ComposergetTelegramClient()
```ts export function getTelegramClient(): PromiseThe error in console
```sh [2023-01-17T05:08:18.046] [INFO] - [Starting reconnect...] The session was sent to saved messages Error: Could not find input entity with key -100xxxx at StringSession.getInputEntity (https://deno.land/x/grm@0.5.3/src/sessions/memory_session.ts:314:13) at async Module.getEntity (https://deno.land/x/grm@0.5.3/src/client/users.ts:159:19) at async file:///home/waptik/code/bots/testbot/src/telegram/handlers/middleware/events.group.ts:25:24 at async https://deno.land/x/grammy@v1.13.0/composer.ts:663:13 at async https://deno.land/x/grammy@v1.13.0/composer.ts:144:13 at async https://deno.land/x/grammy@v1.13.0/composer.ts:141:9 at async https://deno.land/x/grammy@v1.13.0/composer.ts:663:13 at async https://deno.land/x/grammy@v1.13.0/composer.ts:144:13 at async https://deno.land/x/grammy@v1.13.0/composer.ts:141:9 at async https://deno.land/x/grammy@v1.13.0/composer.ts:141:9 ```