Fail to load chats
17:49:25.074 [TDLib thread] WARN it.tdlight.client.AuthorizationStateReadyLoadChats - Failed to execute TdApi.LoadChats()
If I ignore the warn message and send message ,chat not found
it.tdlight.client.TelegramError: 400: Chat not found
at it.tdlight.client.SimpleTelegramClient.lambda$sendUnsafe$5(SimpleTelegramClient.java:377)
at it.tdlight.InternalClient.handleResponse(InternalClient.java:99)
at it.tdlight.InternalClient.handleEvent(InternalClient.java:117)
at it.tdlight.InternalClient.handleEvents(InternalClient.java:71)
at it.tdlight.ClientFactoryImpl.handleClientEvents(ClientFactoryImpl.java:87)
at it.tdlight.ResponseReceiver.run(ResponseReceiver.java:113)
code is :
TdApi.User me = app.getClient().getMeAsync().get(1, TimeUnit.MINUTES);
// Send a test message
SendMessage req = new SendMessage();
req.chatId = me.id;
InputMessageText txt = new InputMessageText();
txt.text = new FormattedText("TDLight test", new TextEntity[0]);
req.inputMessageContent = txt;
Message result = app.getClient().sendMessage(req, true).get(1, TimeUnit.MINUTES);
System.out.println("Sent message:" + result);
is this a bot or a user?
I have the same problem
I have the same problem
Is it a bot or a user?
I encountered the same problem, creating a user. Please help.
I don't know what this is, but when I log in for the first time and wait for a while, the app stops reporting errors.
TdApi.User me = app.getClient().getMeAsync().get(1, TimeUnit.MINUTES);
SendMessage req = new SendMessage();
req.chatId = me.id;
InputMessageText txt = new InputMessageText();
txt.text = new FormattedText("TDLight test", new TextEntity[0]);
req.inputMessageContent = txt;
//first time sleep it
Thread.sleep(3000);
Message result = app.getClient().sendMessage(req, true).get(1, TimeUnit.MINUTES);
System.out.println("Sent message:" + result);
I log in using user
SimpleAuthenticationSupplier<?> authenticationData = AuthenticationSupplier.user("1xxxxxxx");
Note: Don’t forget to delete the session directory when using it
17:49:25.074 [TDLib thread] WARN it.tdlight.client.AuthorizationStateReadyLoadChats - Failed to execute TdApi.LoadChats()If I ignore the warn message and send message ,chat not found
it.tdlight.client.TelegramError: 400: Chat not found at it.tdlight.client.SimpleTelegramClient.lambda$sendUnsafe$5(SimpleTelegramClient.java:377) at it.tdlight.InternalClient.handleResponse(InternalClient.java:99) at it.tdlight.InternalClient.handleEvent(InternalClient.java:117) at it.tdlight.InternalClient.handleEvents(InternalClient.java:71) at it.tdlight.ClientFactoryImpl.handleClientEvents(ClientFactoryImpl.java:87) at it.tdlight.ResponseReceiver.run(ResponseReceiver.java:113)code is :
TdApi.User me = app.getClient().getMeAsync().get(1, TimeUnit.MINUTES); // Send a test message SendMessage req = new SendMessage(); req.chatId = me.id; InputMessageText txt = new InputMessageText(); txt.text = new FormattedText("TDLight test", new TextEntity[0]); req.inputMessageContent = txt; Message result = app.getClient().sendMessage(req, true).get(1, TimeUnit.MINUTES); System.out.println("Sent message:" + result);
Please look at the new example