@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 +3 -2
- package/dist/main.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -11,10 +11,11 @@ npm install @power-bots/powerbotlibrary
|
|
|
11
11
|
|
|
12
12
|
## Usage
|
|
13
13
|
```typescript
|
|
14
|
-
import {
|
|
14
|
+
import { bot } from "@power-bots/powerbotlibrary"
|
|
15
15
|
import { db } from "@power-bots/powerbotlibrary" // If you want to use database
|
|
16
16
|
|
|
17
|
-
|
|
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
|