Update example

This commit is contained in:
Andrea Cavalli 2021-10-23 03:59:02 +02:00
parent 125dea05a3
commit 5e7f597c86

View File

@ -16,6 +16,8 @@ import it.tdlight.jni.TdApi.MessageSenderUser;
import it.tdlight.jni.TdApi.MessageText;
import it.tdlight.jni.TdApi.UpdateAuthorizationState;
import it.tdlight.jni.TdApi.UpdateNewMessage;
import java.nio.file.Path;
import java.nio.file.Paths;
/**
* Example class for TDLight Java
@ -39,6 +41,11 @@ public final class Example {
// Configure the client
TDLibSettings settings = TDLibSettings.create(apiToken);
// Configure the session directory
Path sessionPath = Paths.get("example-tdlight-session");
settings.setDatabaseDirectoryPath(sessionPath.resolve("data"));
settings.setDownloadedFilesDirectoryPath(sessionPath.resolve("downloads"));
// Create a client
SimpleTelegramClient client = new SimpleTelegramClient(settings);