zaileys 0.28.97-beta → 0.28.98-beta

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 +23 -23
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  <div align='center'>
2
- <img alt="Zaileys - Simplify Typescript/Javascript WhatsApp NodeJS API" border='4' src="https://socialify.git.ci/zeative/zaileys/image?description=1&amp;descriptionEditable=Zaileys%20is%20a%20simplified%20version%20of%20the%20Baileys%20package%20%0Awhich%20is%20easier%20and%20faster.&amp;font=KoHo&amp;forks=1&amp;issues=1&amp;language=1&amp;name=1&amp;owner=1&amp;pattern=Circuit%20Board&amp;pulls=1&amp;stargazers=1&amp;theme=Auto">
2
+ <img alt="Zaileys - Simplify Typescript/Javascript WhatsApp NodeJS API" src="https://socialify.git.ci/zeative/zaileys/image?description=1&amp;descriptionEditable=Zaileys%20is%20a%20simplified%20version%20of%20the%20Baileys%20package%20%0Awhich%20is%20easier%20and%20faster.&amp;font=KoHo&amp;forks=1&amp;issues=1&amp;language=1&amp;name=1&amp;owner=1&amp;pattern=Circuit%20Board&amp;pulls=1&amp;stargazers=1&amp;theme=Auto">
3
3
  </div>
4
4
 
5
5
  <h1 align="center">Zaileys - Simplify Typescript/Javascript WhatsApp NodeJS API</h1>
@@ -132,23 +132,23 @@ wa.on("connection", (ctx) => {
132
132
  ```ts
133
133
  wa.on("message", (ctx) => {
134
134
  if (ctx.text == "ping") {
135
- ctx.sendText("Hello! " + ctx.senderName);
135
+ wa.sendText("Hello! " + ctx.senderName);
136
136
  }
137
137
 
138
138
  // text from reply message
139
139
  if (ctx.reply?.text == "ping") {
140
- ctx.sendText("Pong from reply!");
140
+ wa.sendText("Pong from reply!");
141
141
  }
142
142
 
143
143
  // text from nested reply message
144
144
  // you can retrieve reply messages of any depth
145
145
  if (ctx.reply?.reply?.reply?.text == "ping") {
146
- ctx.sendText("Pong from nested reply!");
146
+ wa.sendText("Pong from nested reply!");
147
147
  }
148
148
 
149
149
  // text with footer message (doesn't work on whatsapp desktop)
150
150
  if (ctx.text == "pong") {
151
- ctx.sendText("Ping!", { footer: "Footer message" });
151
+ wa.sendText("Ping!", { footer: "Footer message" });
152
152
  }
153
153
  });
154
154
  ```
@@ -162,17 +162,17 @@ wa.on("message", (ctx) => {
162
162
  ```ts
163
163
  wa.on("message", (ctx) => {
164
164
  if (ctx.text == "ping") {
165
- ctx.sendReply("Pong!");
165
+ wa.sendReply("Pong!");
166
166
  }
167
167
 
168
168
  // reply with footer message (doesn't work on whatsapp desktop)
169
169
  if (ctx.text == "pong") {
170
- ctx.sendReply("Ping!", { footer: "Footer message" });
170
+ wa.sendReply("Ping!", { footer: "Footer message" });
171
171
  }
172
172
 
173
173
  // reply with fake verified badge
174
174
  if (ctx.text == "fake") {
175
- ctx.sendReply("Fake Verified!", { fakeVerified: "whatsapp" });
175
+ wa.sendReply("Fake Verified!", { fakeVerified: "whatsapp" });
176
176
  }
177
177
  });
178
178
  ```
@@ -190,11 +190,11 @@ wa.on("message", async (ctx) => {
190
190
  if (ctx.chatType == "sticker") {
191
191
  const sticker = await ctx.media?.buffer!();
192
192
 
193
- ctx.sendSticker(sticker);
193
+ wa.sendSticker(sticker);
194
194
  }
195
195
 
196
196
  if (ctx.text == "sticker") {
197
- ctx.sendSticker("https://gtihub.com/zeative.png");
197
+ wa.sendSticker("https://gtihub.com/zeative.png");
198
198
  }
199
199
  });
200
200
  ```
@@ -210,17 +210,17 @@ wa.on("message", async (ctx) => {
210
210
  if (ctx.chatType == "image") {
211
211
  const image = await ctx.media?.buffer!();
212
212
 
213
- ctx.sendImage(image);
213
+ wa.sendImage(image);
214
214
  }
215
215
 
216
216
  if (ctx.text == "image") {
217
- ctx.sendImage("https://gtihub.com/zeative.png");
217
+ wa.sendImage("https://gtihub.com/zeative.png");
218
218
  }
219
219
 
220
220
  if (ctx.text == "mypp") {
221
221
  const picture = await ctx.senderImage();
222
222
 
223
- ctx.sendImage(picture);
223
+ wa.sendImage(picture);
224
224
  }
225
225
  });
226
226
  ```
@@ -236,11 +236,11 @@ wa.on("message", async (ctx) => {
236
236
  if (ctx.chatType == "video") {
237
237
  const video = await ctx.media?.buffer!();
238
238
 
239
- ctx.sendVideo(video);
239
+ wa.sendVideo(video);
240
240
  }
241
241
 
242
242
  if (ctx.text == "video") {
243
- ctx.sendVideo("https://gtihub.com/zeative.png");
243
+ wa.sendVideo("https://gtihub.com/zeative.png");
244
244
  }
245
245
  });
246
246
  ```
@@ -256,11 +256,11 @@ wa.on("message", async (ctx) => {
256
256
  if (ctx.chatType == "audio") {
257
257
  const audio = await ctx.media?.buffer!();
258
258
 
259
- ctx.sendAudio(audio);
259
+ wa.sendAudio(audio);
260
260
  }
261
261
 
262
262
  if (ctx.text == "audio") {
263
- ctx.sendAudio("https://gtihub.com/zeative.png");
263
+ wa.sendAudio("https://gtihub.com/zeative.png");
264
264
  }
265
265
  });
266
266
  ```
@@ -277,7 +277,7 @@ wa.on("message", async (ctx) => {
277
277
  // for example set prefix to "/"
278
278
  // and user text "/test"
279
279
  if (ctx.command == "test") {
280
- ctx.sendText("From command message!");
280
+ wa.sendText("From command message!");
281
281
  }
282
282
  });
283
283
  ```
@@ -292,7 +292,7 @@ wa.on("message", async (ctx) => {
292
292
  ```ts
293
293
  wa.on("message", async (ctx) => {
294
294
  if (ctx.text == "mentions") {
295
- ctx.sendText("Here user mentioned: @0 @18002428478");
295
+ wa.sendText("Here user mentioned: @0 @18002428478");
296
296
  // example output: "Here user mentioned: @WhatsApp @ChatGPT"
297
297
 
298
298
  // if `autoMentions` is inactive or `false`
@@ -329,17 +329,17 @@ wa.on("message", async (ctx) => {
329
329
  const isAuthors = ctx.citation?.isAuthors;
330
330
  const isMyPrivateGroups = ctx.citation?.isMyPrivateGroups;
331
331
  const isBannedUsers = ctx.citation?.isBannedUsers;
332
-
332
+
333
333
  if (isAuthors && ctx.text == "test1") {
334
- ctx.sendText("Message for my author: kejaa");
334
+ wa.sendText("Message for my author: kejaa");
335
335
  }
336
336
 
337
337
  if (isMyPrivateGroups && ctx.text == "test2") {
338
- ctx.sendText("Message for my private group!");
338
+ wa.sendText("Message for my private group!");
339
339
  }
340
340
 
341
341
  if (isBannedUsers && ctx.text) {
342
- ctx.sendText("Your number is banned!");
342
+ wa.sendText("Your number is banned!");
343
343
  }
344
344
  });
345
345
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zaileys",
3
- "version": "0.28.97-beta",
3
+ "version": "0.28.98-beta",
4
4
  "description": "Zaileys - Simplify Typescript/Javascript WhatsApp NodeJS API",
5
5
  "keywords": [
6
6
  "zaileys",