zaileys 0.28.9-dev → 0.28.92-dev
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 +6 -0
- package/demo/ai/tools.js +28 -0
- package/demo/ai/you.js +30 -0
- package/demo/index.js +26 -0
- package/demo/package.json +16 -0
- package/demo/pnpm-lock.yaml +1222 -0
- package/demo/screenshot.png +0 -0
- package/dist/index.d.mts +14 -26
- package/dist/index.d.ts +14 -26
- package/dist/index.js +30 -30
- package/dist/index.mjs +30 -30
- package/package.json +3 -3
|
Binary file
|
package/dist/index.d.mts
CHANGED
|
@@ -1,28 +1,7 @@
|
|
|
1
1
|
import * as baileys from '@whiskeysockets/baileys';
|
|
2
|
-
import { EventEmitter } from 'events';
|
|
3
2
|
import NodeCache from 'node-cache';
|
|
4
3
|
import BLog from 'beautify-console-log';
|
|
5
4
|
|
|
6
|
-
declare class Actions extends EventEmitter {
|
|
7
|
-
private client;
|
|
8
|
-
private store;
|
|
9
|
-
phoneNumber: number;
|
|
10
|
-
method: 'pairing' | 'qr';
|
|
11
|
-
showLogs: boolean;
|
|
12
|
-
markOnline: boolean;
|
|
13
|
-
autoRead: boolean;
|
|
14
|
-
authors: number[];
|
|
15
|
-
ignoreMe: boolean;
|
|
16
|
-
startLoading: Function;
|
|
17
|
-
stopLoading: Function;
|
|
18
|
-
restart: Function;
|
|
19
|
-
connection(update: baileys.BaileysEventMap['connection.update']): void;
|
|
20
|
-
messages(m: baileys.BaileysEventMap['messages.upsert']): void;
|
|
21
|
-
contactsUpdate(update: baileys.BaileysEventMap['contacts.update']): void;
|
|
22
|
-
contactsUpsert(update: baileys.BaileysEventMap['contacts.upsert']): void;
|
|
23
|
-
groupsUpdate(updates: baileys.BaileysEventMap['groups.update']): void;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
5
|
/**
|
|
27
6
|
* Decode a JID
|
|
28
7
|
* @param jid The JID to decode
|
|
@@ -35,7 +14,7 @@ declare const decodeJid: (jid: string) => string;
|
|
|
35
14
|
* @param msg The message to serialize
|
|
36
15
|
* @returns The serialized message
|
|
37
16
|
*/
|
|
38
|
-
declare function Serialize(client:
|
|
17
|
+
declare function Serialize(client: Client['client'], config: Client, msg: any): SerializedMessage | undefined;
|
|
39
18
|
interface SerializedMessage {
|
|
40
19
|
roomId: string;
|
|
41
20
|
roomType: RoomType;
|
|
@@ -70,7 +49,7 @@ type RoomType = 'group' | 'private' | 'channel';
|
|
|
70
49
|
|
|
71
50
|
interface ClientProps {
|
|
72
51
|
phoneNumber: number;
|
|
73
|
-
method: 'pairing'
|
|
52
|
+
method: 'pairing';
|
|
74
53
|
showLogs?: boolean;
|
|
75
54
|
markOnline?: boolean;
|
|
76
55
|
autoRead?: boolean;
|
|
@@ -85,8 +64,9 @@ declare class Client {
|
|
|
85
64
|
private credsPath;
|
|
86
65
|
private storePath;
|
|
87
66
|
private logger;
|
|
67
|
+
private actions;
|
|
88
68
|
readonly phoneNumber: number;
|
|
89
|
-
readonly method: 'pairing'
|
|
69
|
+
readonly method: 'pairing';
|
|
90
70
|
readonly showLogs: boolean;
|
|
91
71
|
readonly markOnline: boolean;
|
|
92
72
|
readonly autoRead: boolean;
|
|
@@ -105,13 +85,21 @@ declare class Client {
|
|
|
105
85
|
reaction(data: any, emoji: any): Promise<SerializedMessage | undefined>;
|
|
106
86
|
}
|
|
107
87
|
|
|
88
|
+
declare class Actions {
|
|
89
|
+
private client;
|
|
90
|
+
constructor(client: Client['client']);
|
|
91
|
+
getGroupName(id: string): any;
|
|
92
|
+
}
|
|
93
|
+
|
|
108
94
|
declare class Logger {
|
|
109
95
|
private bannerLogo;
|
|
110
96
|
private copyright;
|
|
97
|
+
private client;
|
|
98
|
+
private actions;
|
|
111
99
|
private spinner;
|
|
112
|
-
constructor();
|
|
100
|
+
constructor(client: Logger['client']);
|
|
113
101
|
banner(): void;
|
|
114
|
-
msgLogs(data: SerializedMessage): void
|
|
102
|
+
msgLogs(data: SerializedMessage): Promise<void>;
|
|
115
103
|
runSpinner(text: string): void;
|
|
116
104
|
editSpinner(text: string): void;
|
|
117
105
|
stopSpinner(status: ("succeed" | "fail" | "warn" | "info") | undefined, text: string): void;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,28 +1,7 @@
|
|
|
1
1
|
import * as baileys from '@whiskeysockets/baileys';
|
|
2
|
-
import { EventEmitter } from 'events';
|
|
3
2
|
import NodeCache from 'node-cache';
|
|
4
3
|
import BLog from 'beautify-console-log';
|
|
5
4
|
|
|
6
|
-
declare class Actions extends EventEmitter {
|
|
7
|
-
private client;
|
|
8
|
-
private store;
|
|
9
|
-
phoneNumber: number;
|
|
10
|
-
method: 'pairing' | 'qr';
|
|
11
|
-
showLogs: boolean;
|
|
12
|
-
markOnline: boolean;
|
|
13
|
-
autoRead: boolean;
|
|
14
|
-
authors: number[];
|
|
15
|
-
ignoreMe: boolean;
|
|
16
|
-
startLoading: Function;
|
|
17
|
-
stopLoading: Function;
|
|
18
|
-
restart: Function;
|
|
19
|
-
connection(update: baileys.BaileysEventMap['connection.update']): void;
|
|
20
|
-
messages(m: baileys.BaileysEventMap['messages.upsert']): void;
|
|
21
|
-
contactsUpdate(update: baileys.BaileysEventMap['contacts.update']): void;
|
|
22
|
-
contactsUpsert(update: baileys.BaileysEventMap['contacts.upsert']): void;
|
|
23
|
-
groupsUpdate(updates: baileys.BaileysEventMap['groups.update']): void;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
5
|
/**
|
|
27
6
|
* Decode a JID
|
|
28
7
|
* @param jid The JID to decode
|
|
@@ -35,7 +14,7 @@ declare const decodeJid: (jid: string) => string;
|
|
|
35
14
|
* @param msg The message to serialize
|
|
36
15
|
* @returns The serialized message
|
|
37
16
|
*/
|
|
38
|
-
declare function Serialize(client:
|
|
17
|
+
declare function Serialize(client: Client['client'], config: Client, msg: any): SerializedMessage | undefined;
|
|
39
18
|
interface SerializedMessage {
|
|
40
19
|
roomId: string;
|
|
41
20
|
roomType: RoomType;
|
|
@@ -70,7 +49,7 @@ type RoomType = 'group' | 'private' | 'channel';
|
|
|
70
49
|
|
|
71
50
|
interface ClientProps {
|
|
72
51
|
phoneNumber: number;
|
|
73
|
-
method: 'pairing'
|
|
52
|
+
method: 'pairing';
|
|
74
53
|
showLogs?: boolean;
|
|
75
54
|
markOnline?: boolean;
|
|
76
55
|
autoRead?: boolean;
|
|
@@ -85,8 +64,9 @@ declare class Client {
|
|
|
85
64
|
private credsPath;
|
|
86
65
|
private storePath;
|
|
87
66
|
private logger;
|
|
67
|
+
private actions;
|
|
88
68
|
readonly phoneNumber: number;
|
|
89
|
-
readonly method: 'pairing'
|
|
69
|
+
readonly method: 'pairing';
|
|
90
70
|
readonly showLogs: boolean;
|
|
91
71
|
readonly markOnline: boolean;
|
|
92
72
|
readonly autoRead: boolean;
|
|
@@ -105,13 +85,21 @@ declare class Client {
|
|
|
105
85
|
reaction(data: any, emoji: any): Promise<SerializedMessage | undefined>;
|
|
106
86
|
}
|
|
107
87
|
|
|
88
|
+
declare class Actions {
|
|
89
|
+
private client;
|
|
90
|
+
constructor(client: Client['client']);
|
|
91
|
+
getGroupName(id: string): any;
|
|
92
|
+
}
|
|
93
|
+
|
|
108
94
|
declare class Logger {
|
|
109
95
|
private bannerLogo;
|
|
110
96
|
private copyright;
|
|
97
|
+
private client;
|
|
98
|
+
private actions;
|
|
111
99
|
private spinner;
|
|
112
|
-
constructor();
|
|
100
|
+
constructor(client: Logger['client']);
|
|
113
101
|
banner(): void;
|
|
114
|
-
msgLogs(data: SerializedMessage): void
|
|
102
|
+
msgLogs(data: SerializedMessage): Promise<void>;
|
|
115
103
|
runSpinner(text: string): void;
|
|
116
104
|
editSpinner(text: string): void;
|
|
117
105
|
stopSpinner(status: ("succeed" | "fail" | "warn" | "info") | undefined, text: string): void;
|