ddbot.js-0374 3.1.1 → 3.1.3

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/bot/bot.js +5 -0
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "teeworlds": "^2.5.8"
6
6
  },
7
7
  "name": "ddbot.js-0374",
8
- "version": "3.1.1",
8
+ "version": "3.1.3",
9
9
  "description": "ddbot.js — это Node.js проект для автоматизации и управления ботами, а также работы с картами и логами.",
10
10
  "main": "./index.js",
11
11
  "scripts": {
package/src/bot/bot.js CHANGED
@@ -4,6 +4,7 @@
4
4
  const teeworlds = require('teeworlds');
5
5
  const EventEmitter = require('events');
6
6
  const DebugLogger = require('Loger0374');
7
+ const { log } = require('console');
7
8
  const logDebuger = new DebugLogger('BotManager', false, true, null, true);
8
9
  const logDebug = ( ...args) => {
9
10
  logDebuger.logDebug(...args);
@@ -114,8 +115,11 @@ class BotManager extends EventEmitter {
114
115
  logDebug('initializing freeze state');
115
116
  this.botFreezeStates.set(uniqueBotName, false);
116
117
 
118
+ logDebug('bot create done', uniqueBotName)
117
119
  return uniqueBotName;
118
120
  } catch (error) {
121
+ logDebug('error bot create')
122
+ logDebug(error);
119
123
  return null; // не получилось
120
124
  }
121
125
  }
@@ -129,6 +133,7 @@ class BotManager extends EventEmitter {
129
133
  logDebug('connectBot called with botName:', botName); // логируем вызов функции
130
134
  const botInfo = this.getBotInfo(botName); // получаем инфу о боте
131
135
  if (!botInfo) {
136
+ logDebug('bot not found');
132
137
  return false; // бот не найден
133
138
  }
134
139
  try {