Skip to content

Commit a097120

Browse files
committed
1.4.0-1 first update
1 parent fe2b044 commit a097120

19 files changed

Lines changed: 22619 additions & 528 deletions

README.md

Lines changed: 5 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -65,25 +65,12 @@ interface TDLib {
6565
*/
6666
td_client_receive(client_id: number, timeout: number);
6767
/**
68-
* Sets the path to the file to where the internal TDLib log will be written.
69-
* By default TDLib writes logs to stderr or an OS specific log.
70-
* Use this method to write the log to a file instead.
71-
* @param {string} file_path Path to a file where the internal TDLib log will be written. Use an empty path to switch back to the default logging behaviour.
72-
* @returns {boolean} True on success, or false otherwise, i.e. if the file can't be opened for writing.
68+
* Sends synchronized request to TDLib.
69+
* @param client_id Client identifier
70+
* @param request JSON serialized request
7371
*/
74-
td_set_log_file_path(file_path: string): boolean;
75-
/**
76-
* Sets maximum size of the file to where the internal TDLib log is written before the file will be auto-rotated.
77-
* Unused if log is not written to a file. Defaults to 10 MB.
78-
* @param {number} max_file_size Maximum size of the file to where the internal TDLib log is written before the file will be auto-rotated. Should be positive.
79-
*/
80-
td_set_log_max_file_size(max_file_size: number);
81-
/**
82-
* Sets the verbosity level of the internal logging of TDLib.
83-
* By default the TDLib uses a verbosity level of 5 for logging.
84-
* @param {number} new_verbosity_level New value of the verbosity level for logging. Value 0 corresponds to fatal errors, value 1 corresponds to errors, value 2 corresponds to warnings and debug warnings, value 3 corresponds to informational, value 4 corresponds to debug, value 5 corresponds to verbose debug, value greater than 5 and up to 1024 can be used to enable even more logging.
85-
*/
86-
td_set_log_verbosity_level(new_verbosity_level: number);
72+
td_client_execute(client_id: number, request: string): string;
73+
8774
}
8875
```
8976

@@ -139,32 +126,6 @@ interface TdClientActorOptions {
139126
}
140127
```
141128

142-
## Logger Interface
143-
144-
```typescript
145-
interface Logger {
146-
/**
147-
* Sets the path to the file to where the internal TDLib log will be written.
148-
* By default TDLib writes logs to stderr or an OS specific log.
149-
* Use this method to write the log to a file instead.
150-
* @param {string} file_path Path to a file where the internal TDLib log will be written. Use an empty path to switch back to the default logging behaviour.
151-
* @returns {boolean} True on success, or false otherwise, i.e. if the file can't be opened for writing.
152-
*/
153-
setLogFilePath(file_path: string): boolean;
154-
/**
155-
* Sets maximum size of the file to where the internal TDLib log is written before the file will be auto-rotated.
156-
* Unused if log is not written to a file. Defaults to 10 MB.
157-
* @param {number} max_file_size Maximum size of the file to where the internal TDLib log is written before the file will be auto-rotated. Should be positive.
158-
*/
159-
setLogMaxFileSize(max_file_size: number);
160-
/**
161-
* Sets the verbosity level of the internal logging of TDLib.
162-
* By default the TDLib uses a verbosity level of 5 for logging.
163-
* @param {number} new_verbosity_level New value of the verbosity level for logging. Value 0 corresponds to fatal errors, value 1 corresponds to errors, value 2 corresponds to warnings and debug warnings, value 3 corresponds to informational, value 4 corresponds to debug, value 5 corresponds to verbose debug, value greater than 5 and up to 1024 can be used to enable even more logging.
164-
*/
165-
setLogVerbosityLevel(new_verbosity_level: number);
166-
}
167-
```
168129

169130
## Bot API Interface
170131

bot_api.d.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { TdClientActor, TdClientActorOptions } from "./td_client_actor"
2+
3+
declare export class Bot extends TdClientActor {
4+
constructor(api_id: number, api_hash: string, bot_token: string, use_test_dc = false, identifier?: string = null, options: TdClientActorOptions);
5+
6+
}

0 commit comments

Comments
 (0)