@power-bots/powerbotlibrary 0.1.0 → 0.1.1

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/README.md CHANGED
@@ -11,10 +11,11 @@ npm install @power-bots/powerbotlibrary
11
11
 
12
12
  ## Usage
13
13
  ```typescript
14
- import { Bot } from "@power-bots/powerbotlibrary"
14
+ import { bot } from "@power-bots/powerbotlibrary"
15
15
  import { db } from "@power-bots/powerbotlibrary" // If you want to use database
16
16
 
17
- const bot = new Bot(__dirname)
17
+ bot.setup(__dirname)
18
+ bot.run()
18
19
  ```
19
20
 
20
21
  More documentation will be available soon.
package/dist/main.js CHANGED
@@ -28,11 +28,11 @@ class Bot {
28
28
  this.dirname = dirname;
29
29
  }
30
30
  run() {
31
+ this.log = new log_1.Log();
31
32
  if (!this.dirname) {
32
33
  this.log.error(`Bot was not setup.`);
33
34
  process.exit();
34
35
  }
35
- this.log = new log_1.Log();
36
36
  (0, db_1.updateDatabase)(this.dirname);
37
37
  this.log.info("Press Control+C to stop the bot");
38
38
  // ENVIROMENT VARS
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@power-bots/powerbotlibrary",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "main": "dist/main.js",
5
5
  "types": "dist/main.d.ts",
6
6
  "dependencies": {