halbot 1989.6.13 → 1989.6.15
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 +10 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -34,34 +34,43 @@ All supported configuration fields:
|
|
|
34
34
|
|
|
35
35
|
```js
|
|
36
36
|
{
|
|
37
|
+
|
|
37
38
|
// REQUIRED, string.
|
|
38
39
|
"telegramToken": "[[Telegram Bot API Token]]",
|
|
40
|
+
|
|
39
41
|
// OPTIONAL, string.
|
|
40
42
|
// One of the chatGptKey or bingToken is required.
|
|
41
43
|
"chatGptKey": "[[ChatGPT API Key]]",
|
|
44
|
+
|
|
42
45
|
// OPTIONAL, string.
|
|
43
46
|
// One of the chatGptKey or bingToken is required.
|
|
44
47
|
"bingToken": "[[Bing Usertoken from cookies]]",
|
|
48
|
+
|
|
45
49
|
// OPTIONAL, string.
|
|
46
50
|
// Set this field if you need TTS/STT features.
|
|
47
51
|
"googleApiKey": "[[Google Cloud API Key]]",
|
|
52
|
+
|
|
48
53
|
// OPTIONAL, undefined || array of string.
|
|
49
54
|
// To open the bot to PUBLIC, DO NOT set this field;
|
|
50
55
|
// To restrict the bot to PRIVATE, set chat/group/channel ids in this array.
|
|
51
56
|
"private": ["[[CHAT_ID]]", "[[GROUP_ID]]", "[[CHANNEL_ID]]", ...],
|
|
57
|
+
|
|
52
58
|
// OPTIONAL, string.
|
|
53
59
|
// Set this field if you want to use a `magic word` to authenticate the bot.
|
|
54
60
|
"magicWord": "[[Your Magic Word here]]",
|
|
61
|
+
|
|
55
62
|
// OPTIONAL, string.
|
|
56
63
|
// Use a HOME GROUP to authentication users.
|
|
57
64
|
// Anyone in this group can access the bot.
|
|
58
65
|
"homeGroup": "[[GROUP_ID]]",
|
|
66
|
+
|
|
59
67
|
// OPTIONAL, array of enum string.
|
|
60
68
|
// Enum: 'private', 'mention', 'group', 'channel'.
|
|
61
69
|
// Defaule: ['private', 'mention'].
|
|
62
70
|
// By default, it will only reply to `private` chats and group `mention`s.
|
|
63
71
|
// Adding 'group' or 'channel' may cause too much disturbance.
|
|
64
72
|
"chatType": ["mention", "private"]
|
|
73
|
+
|
|
65
74
|
}
|
|
66
75
|
```
|
|
67
76
|
|
|
@@ -87,6 +96,7 @@ Usage:
|
|
|
87
96
|
import halbot from 'halbot';
|
|
88
97
|
|
|
89
98
|
const config = {
|
|
99
|
+
|
|
90
100
|
// ...[[ALL THE CONFIG FIELDS SUPPORTED ABOVE]]],
|
|
91
101
|
|
|
92
102
|
// OPTIONAL, function.
|