chz-telegram-bot 0.0.41 → 0.0.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.d.ts +2 -0
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +2 -1
- package/main.ts +5 -1
- package/package.json +1 -1
package/dist/main.d.ts
CHANGED
|
@@ -24,6 +24,8 @@ declare function startBot(options: {
|
|
|
24
24
|
storagePath?: string;
|
|
25
25
|
/** Period of time between execution of scheduled actions. */
|
|
26
26
|
scheduledPeriod?: Seconds;
|
|
27
|
+
/** If true, telegram API objects will be logged instead of message content. */
|
|
28
|
+
verboseLoggingForIncomingMessage?: boolean;
|
|
27
29
|
}): Promise<BotInstance>;
|
|
28
30
|
/**
|
|
29
31
|
* Terminates all scheduled tasks, closes storage connections and stops all bots.
|
package/dist/main.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../main.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEjD,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAQ7C;;GAEG;AACH,iBAAe,QAAQ,CAAC,OAAO,EAAE;IAC7B,gCAAgC;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,kDAAkD;IAClD,aAAa,EAAE,MAAM,CAAC;IACtB,2HAA2H;IAC3H,QAAQ,EAAE,aAAa,CAAC,YAAY,CAAC,EAAE,CAAC;IACxC,mGAAmG;IACnG,SAAS,EAAE,eAAe,CAAC,YAAY,CAAC,EAAE,CAAC;IAC3C,y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,MAAM,iBASrC;AAED,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC"}
|
package/dist/main.js
CHANGED
|
@@ -23,7 +23,8 @@ async function startBot(options) {
|
|
|
23
23
|
chats: options.chats,
|
|
24
24
|
storageClient: options.storageClient,
|
|
25
25
|
storagePath: options.storagePath,
|
|
26
|
-
scheduledPeriod: options.scheduledPeriod
|
|
26
|
+
scheduledPeriod: options.scheduledPeriod,
|
|
27
|
+
verboseLoggingForIncomingMessage: options.verboseLoggingForIncomingMessage
|
|
27
28
|
});
|
|
28
29
|
bots.push(bot);
|
|
29
30
|
return bot;
|
package/main.ts
CHANGED
|
@@ -34,6 +34,8 @@ async function startBot(options: {
|
|
|
34
34
|
storagePath?: string;
|
|
35
35
|
/** Period of time between execution of scheduled actions. */
|
|
36
36
|
scheduledPeriod?: Seconds;
|
|
37
|
+
/** If true, telegram API objects will be logged instead of message content. */
|
|
38
|
+
verboseLoggingForIncomingMessage?: boolean;
|
|
37
39
|
}) {
|
|
38
40
|
const token = await readFile(options.tokenFilePath, 'utf8');
|
|
39
41
|
const bot = new BotInstance({
|
|
@@ -44,7 +46,9 @@ async function startBot(options: {
|
|
|
44
46
|
chats: options.chats,
|
|
45
47
|
storageClient: options.storageClient,
|
|
46
48
|
storagePath: options.storagePath,
|
|
47
|
-
scheduledPeriod: options.scheduledPeriod
|
|
49
|
+
scheduledPeriod: options.scheduledPeriod,
|
|
50
|
+
verboseLoggingForIncomingMessage:
|
|
51
|
+
options.verboseLoggingForIncomingMessage
|
|
48
52
|
});
|
|
49
53
|
bots.push(bot);
|
|
50
54
|
|