halbot 1989.6.12 → 1989.6.14

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/README.md +16 -5
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -15,47 +15,54 @@ Just another `ChatGPT`/`Bing Chat` Telegram bob, which is simple design, easy to
15
15
  - Support `private` and `public` mode, with multiple authenticate methods.
16
16
  - `Middleware` style workflow, easy to extend.
17
17
 
18
- ## How to use
18
+ ## Run it in peace-of-mind
19
19
 
20
20
  ### Configuration
21
21
 
22
22
  Make the `halbot` json config file and put it in this path `~/.halbot.json`.
23
23
 
24
- #### Basic config demo
24
+ Basic config demo:
25
25
 
26
26
  ```json
27
27
  {
28
28
  "telegramToken": "[[Telegram Bot API Token]]",
29
- "chatGptKey": "[[ChatGPT API Key]]",
29
+ "chatGptKey": "[[ChatGPT API Key]]"
30
30
  }
31
31
  ```
32
32
 
33
- #### All supported configuration fields
33
+ All supported configuration fields:
34
34
 
35
35
  ```js
36
36
  {
37
37
  // REQUIRED, string.
38
38
  "telegramToken": "[[Telegram Bot API Token]]",
39
+
39
40
  // OPTIONAL, string.
40
41
  // One of the chatGptKey or bingToken is required.
41
42
  "chatGptKey": "[[ChatGPT API Key]]",
43
+
42
44
  // OPTIONAL, string.
43
45
  // One of the chatGptKey or bingToken is required.
44
46
  "bingToken": "[[Bing Usertoken from cookies]]",
47
+
45
48
  // OPTIONAL, string.
46
49
  // Set this field if you need TTS/STT features.
47
50
  "googleApiKey": "[[Google Cloud API Key]]",
51
+
48
52
  // OPTIONAL, undefined || array of string.
49
53
  // To open the bot to PUBLIC, DO NOT set this field;
50
54
  // To restrict the bot to PRIVATE, set chat/group/channel ids in this array.
51
55
  "private": ["[[CHAT_ID]]", "[[GROUP_ID]]", "[[CHANNEL_ID]]", ...],
56
+
52
57
  // OPTIONAL, string.
53
58
  // Set this field if you want to use a `magic word` to authenticate the bot.
54
59
  "magicWord": "[[Your Magic Word here]]",
60
+
55
61
  // OPTIONAL, string.
56
62
  // Use a HOME GROUP to authentication users.
57
63
  // Anyone in this group can access the bot.
58
64
  "homeGroup": "[[GROUP_ID]]",
65
+
59
66
  // OPTIONAL, array of enum string.
60
67
  // Enum: 'private', 'mention', 'group', 'channel'.
61
68
  // Defaule: ['private', 'mention'].
@@ -73,12 +80,16 @@ Run it in peace of mind.
73
80
  $ npx halbot
74
81
  ```
75
82
 
76
- ### Integrate to your project
83
+ ## Integrate to your project
84
+
85
+ Install:
77
86
 
78
87
  ```bash
79
88
  $ npm i halbot
80
89
  ```
81
90
 
91
+ Usage:
92
+
82
93
  ```js
83
94
  import halbot from 'halbot';
84
95
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "halbot",
3
3
  "description": "Just another ChatGPT/Bing Telegram bob.",
4
- "version": "1989.6.12",
4
+ "version": "1989.6.14",
5
5
  "private": false,
6
6
  "homepage": "https://github.com/Leask/halbot",
7
7
  "type": "module",