zaileys 0.28.95-beta → 0.28.96-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 +15 -4
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -314,22 +314,33 @@ const wa = new Client({
314
314
 
315
315
  // just example you can edit with your own
316
316
  citation: {
317
- authors: ["628xxxx"],
318
- myPrivateGroups: ["1203633xxxxx"]
317
+ authors: () => ["628xxxx"],
318
+ myPrivateGroups: () => ["1203633xxxxx"],
319
+ bannedUsers: async () => {
320
+ const res = await fetch("/get/user/banned")
321
+ const users = await res.json()
322
+
323
+ return users // ["628xx", "628xx", "628xx"]
324
+ }
319
325
  }
320
326
  })
321
327
 
322
328
  wa.on("message", async (ctx) => {
323
329
  const isAuthors = ctx.citation?.isAuthors;
324
330
  const isMyPrivateGroups = ctx.citation?.isMyPrivateGroups;
331
+ const isBannedUsers = ctx.citation?.isBannedUsers;
325
332
 
326
- if (isAuthors && ctx.text == "ping") {
333
+ if (isAuthors && ctx.text == "test1") {
327
334
  ctx.sendText("Message for my author: kejaa");
328
335
  }
329
336
 
330
- if (isMyPrivateGroups && ctx.text == "pong") {
337
+ if (isMyPrivateGroups && ctx.text == "test2") {
331
338
  ctx.sendText("Message for my private group!");
332
339
  }
340
+
341
+ if (isBannedUsers && ctx.text) {
342
+ ctx.sendText("Your number is banned!");
343
+ }
333
344
  });
334
345
  ```
335
346
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zaileys",
3
- "version": "0.28.95-beta",
3
+ "version": "0.28.96-beta",
4
4
  "description": "Zaileys - Simplify Typescript/Javascript WhatsApp NodeJS API",
5
5
  "keywords": [
6
6
  "zaileys",