Update example
This commit is contained in:
parent
125dea05a3
commit
5e7f597c86
@ -16,6 +16,8 @@ import it.tdlight.jni.TdApi.MessageSenderUser;
|
|||||||
import it.tdlight.jni.TdApi.MessageText;
|
import it.tdlight.jni.TdApi.MessageText;
|
||||||
import it.tdlight.jni.TdApi.UpdateAuthorizationState;
|
import it.tdlight.jni.TdApi.UpdateAuthorizationState;
|
||||||
import it.tdlight.jni.TdApi.UpdateNewMessage;
|
import it.tdlight.jni.TdApi.UpdateNewMessage;
|
||||||
|
import java.nio.file.Path;
|
||||||
|
import java.nio.file.Paths;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Example class for TDLight Java
|
* Example class for TDLight Java
|
||||||
@ -39,6 +41,11 @@ public final class Example {
|
|||||||
// Configure the client
|
// Configure the client
|
||||||
TDLibSettings settings = TDLibSettings.create(apiToken);
|
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
|
// Create a client
|
||||||
SimpleTelegramClient client = new SimpleTelegramClient(settings);
|
SimpleTelegramClient client = new SimpleTelegramClient(settings);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user