chz-telegram-bot 0.0.49 → 0.0.50

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.
@@ -1 +1 @@
1
- {"version":3,"file":"telegramApi.d.ts","sourceRoot":"","sources":["../../services/telegramApi.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAEpE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAiB,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAGrD,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAIlE,qBAAa,kBAAkB;IAC3B,UAAU,UAAS;IACnB,YAAY,EAAE,WAAW,EAAE,CAAM;IAEjC,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,QAAQ,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,OAAO,EAAE,cAAc,CAAC;gBAGpB,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,cAAc,EACvB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAQjC,uBAAuB,CAAC,SAAS,EAAE,WAAW,EAAE;IAM1C,cAAc;YAiCN,WAAW;YAqBX,eAAe;IA+E7B,2BAA2B,CAAC,YAAY,SAAS,YAAY,EACzD,GAAG,EAAE,cAAc,CAAC,YAAY,CAAC,EACjC,eAAe,EAAE,eAAe,EAChC,OAAO,E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cAAc,CAAC,YAAY,CAAC,EACjC,eAAe,EAAE,eAAe,EAChC,OAAO,EAAE,aAAa,CAAC,YAAY,CAAC;IAUxC,wBAAwB,CAAC,YAAY,SAAS,YAAY,EACtD,GAAG,EAAE,WAAW,CAAC,YAAY,CAAC,EAC9B,MAAM,EAAE,MAAM,EACd,eAAe,EAAE,eAAe,CAAC,YAAY,CAAC;CAWrD"}
@@ -23,13 +23,11 @@ class TelegramApiService {
23
23
  if (this.isFlushing)
24
24
  return;
25
25
  this.isFlushing = true;
26
- console.log(`Flushing ${this.messageQueue.length} messages for ${this.botName}`);
27
26
  while (this.messageQueue.length) {
28
- const message = this.messageQueue.pop();
27
+ const message = this.messageQueue.shift();
29
28
  if (!message)
30
29
  break;
31
30
  try {
32
- console.log(`Sending message ${message.kind} to ${message.chatId} for ${this.botName}`);
33
31
  await this.processResponse(message);
34
32
  await (0, promises_1.setTimeout)(TELEGRAM_RATELIMIT_DELAY);
35
33
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chz-telegram-bot",
3
- "version": "0.0.49",
3
+ "version": "0.0.50",
4
4
  "type": "module",
5
5
  "dependencies": {
6
6
  "async-sema": "^3.1.1",
@@ -47,18 +47,12 @@ export class TelegramApiService {
47
47
 
48
48
  this.isFlushing = true;
49
49
 
50
- console.log(
51
- `Flushing ${this.messageQueue.length} messages for ${this.botName}`
52
- );
53
50
  while (this.messageQueue.length) {
54
- const message = this.messageQueue.pop();
51
+ const message = this.messageQueue.shift();
55
52
 
56
53
  if (!message) break;
57
54
 
58
55
  try {
59
- console.log(
60
- `Sending message ${message.kind} to ${message.chatId} for ${this.botName}`
61
- );
62
56
  await this.processResponse(message);
63
57
  await setTimeout(TELEGRAM_RATELIMIT_DELAY);
64
58
  } catch (error) {