socketon 0.30.7 → 1.6.0

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
@@ -1,184 +1,63 @@
1
- <p align="center">
2
- <img src="https://files.catbox.moe/0wl8py.png" alt="socketon" width="320" />
3
- </p>
1
+ <div align="center">
2
+ <img src="https://camo.githubusercontent.com/aeb57cb85f8b46c9828d450dcf3d9f79abf68c2f273446ec20fb00c813c9e59b/68747470733a2f2f66696c65732e636174626f782e6d6f652f30776c3870792e706e67" alt="Socketon Banner" width="100%">
3
+ </div>
4
4
 
5
- <a id="readme-top"></a>
5
+ # Socketon
6
6
 
7
- <p align="center">
8
- WhatsApp API library (fork of baileys) with improved stability, custom pairing code, and better session handling.
9
- </p>
7
+ **WhatsApp API Modification** - Advanced WhatsApp integration library with enhanced features and security.
10
8
 
11
- <p align="center">
12
- <a href="https://www.npmjs.com/package/socketon">
13
- <img src="https://img.shields.io/npm/v/socketon" />
14
- </a>
15
- <a href="https://www.npmjs.com/package/socketon">
16
- <img src="https://img.shields.io/npm/dm/socketon" />
17
- </a>
18
- <a href="./LICENSE">
19
- <img src="https://img.shields.io/npm/l/socketon" />
20
- </a>
21
- </p>
9
+ ## Description
22
10
 
23
- ---
11
+ Socketon is a powerful WhatsApp API modification designed for building robust messaging applications. It provides enhanced features for managing conversations, automating responses, and integrating with various services.
24
12
 
25
- ## why socketon?
13
+ ## Features
26
14
 
27
- kalau kamu ngerasa baileys sekarang udah delay, suka double respon, atau kadang infinite connecting, socketon bisa jadi alternatif yang lebih enak.
15
+ - WhatsApp message automation
16
+ - Group management capabilities
17
+ - Interactive message support
18
+ - Session management
19
+ - Custom pairing process
20
+ - Multi-device compatibility
21
+ - Advanced security features
28
22
 
29
- ini fork dari baileys yang difokusin buat stabilitas, session handling, dan pairing code yang lebih fleksibel. sebagian besar api tetap sama, jadi migrasi dari baileys biasanya gak butuh perubahan besar.
30
-
31
- ---
32
-
33
- ## features
34
-
35
- - custom pairing code (default: socketon)
36
- - improved session handling (lebih rapih dan stabil)
37
- - multi-device support
38
- - interactive messages (buttons, list, native flow)
39
- - album messages (multiple images)
40
- - newsletter support + auto-follow (built-in)
41
- - event / poll / payment request / product messages
42
- - document support
43
- - lightweight and fast, no browser required
44
-
45
- ---
46
-
47
- ## installation
23
+ ## Installation
48
24
 
49
25
  ```bash
50
- npm i socketon
26
+ npm install socketon
51
27
  ```
52
28
 
53
- requirements:
54
- - node.js >= 20
55
-
56
- ---
57
-
58
- ## quick start
59
-
60
- ### connect (qr)
61
-
62
- ```js
63
- const { makeWASocket, useMultiFileAuthState } = require('socketon')
64
-
65
- async function start() {
66
- const { state, saveCreds } = await useMultiFileAuthState('./auth')
29
+ ## Usage
67
30
 
68
- const sock = makeWASocket({
69
- auth: state,
70
- printQRInTerminal: true
71
- })
31
+ ```javascript
32
+ const { makeWASocket } = require('socketon');
72
33
 
73
- sock.ev.on('creds.update', saveCreds)
74
-
75
- sock.ev.on('connection.update', ({ connection }) => {
76
- if (connection === 'open') console.log('connected')
77
- if (connection === 'close') console.log('disconnected')
78
- })
79
- }
80
-
81
- start()
34
+ // Initialize the socket
35
+ const sock = makeWASocket({
36
+ // Configuration options
37
+ });
82
38
  ```
83
39
 
84
- ### auto reply (simple)
85
-
86
- ```js
87
- sock.ev.on('messages.upsert', async ({ messages }) => {
88
- const m = messages[0]
89
- if (!m?.message || m.key.fromMe) return
90
-
91
- const jid = m.key.remoteJid
92
- const text = m.message.conversation || m.message.extendedTextMessage?.text
93
- if (!text) return
94
-
95
- await sock.sendMessage(jid, { text: `echo: ${text}` })
96
- })
97
- ```
98
-
99
- ---
100
-
101
- ## pairing code (no qr)
102
-
103
- ```js
104
- const { makeWASocket, useMultiFileAuthState } = require('socketon')
105
-
106
- async function pairing() {
107
- const { state, saveCreds } = await useMultiFileAuthState('./auth')
108
-
109
- const sock = makeWASocket({
110
- auth: state,
111
- printQRInTerminal: false
112
- })
113
-
114
- sock.ev.on('creds.update', saveCreds)
115
-
116
- sock.ev.on('connection.update', async ({ connection }) => {
117
- if (connection !== 'open') return
118
-
119
- const code = await sock.requestPairingCode('6281234567890')
120
- console.log('pairing code:', code)
121
-
122
- // custom
123
- // const custom = await sock.requestPairingCode('6281234567890', 'KODEKAMU')
124
- // console.log('custom code:', custom)
125
- })
126
- }
127
-
128
- pairing()
129
- ```
130
-
131
- ---
132
-
133
- ## migration from baileys
134
-
135
- pindah dari baileys biasanya simpel, cukup ganti import:
136
-
137
- ```js
138
- // baileys
139
- const { makeWASocket } = require('@whiskeysockets/baileys')
140
-
141
- // socketon
142
- const { makeWASocket } = require('socketon')
143
- ```
144
-
145
- ---
146
-
147
- ## docs
148
-
149
- full docs dan advanced examples:
150
- - [DOCS/README.md](./DOCS/README.md)
151
-
152
- ---
40
+ ## Version
153
41
 
154
- ## links
42
+ **1.6.0**
155
43
 
156
- - npm: https://www.npmjs.com/package/socketon
157
- - repo: https://github.com/IbraDecode/socketon
158
- - issues: https://github.com/IbraDecode/socketon/issues
159
- - discussions: https://github.com/IbraDecode/socketon/discussions
44
+ ## License
160
45
 
161
- ---
46
+ MIT
162
47
 
163
- ## contributors
48
+ ## Author
164
49
 
165
- <a href="https://github.com/IbraDecode/socketon/graphs/contributors">
166
- <img src="https://contrib.rocks/image?repo=IbraDecode/socketon" alt="contributors" />
167
- </a>
50
+ Ibra Decode
168
51
 
169
- ---
52
+ ## Repository
170
53
 
171
- ## credits
54
+ https://www.npmjs.com/package/socketon
172
55
 
173
- - original baileys by @adiwajshing
174
- - modified and maintained by kiuur & ibra decode
56
+ ## Dependencies
175
57
 
176
- ---
58
+ - node >=20.0.0
59
+ - Various security-enhanced modules
177
60
 
178
- <p align="center">
179
- star repo ini kalau bermanfaat
180
- </p>
61
+ ## Notes
181
62
 
182
- <p align="center">
183
- <a href="#readme-top">back to top</a>
184
- </p>
63
+ This library is intended for legitimate use cases only. Please respect WhatsApp's Terms of Service when using this library.
@@ -0,0 +1,4 @@
1
+ yarn pbjs -t static-module -w commonjs -o ./WAProto/index.js ./WAProto/WAProto.proto;
2
+ yarn pbts -o ./WAProto/index.d.ts ./WAProto/index.js;
3
+
4
+ #protoc --plugin=./node_modules/.bin/protoc-gen-ts_proto --ts_proto_opt=env=node,useOptionals=true,forceLong=long --ts_proto_out=. ./src/Binary/WAMessage.proto;