@roidev/kachina-md 1.0.1 → 1.1.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.
@@ -1,7 +1,6 @@
1
1
  import makeWASocket, {
2
2
  DisconnectReason,
3
3
  useMultiFileAuthState,
4
- makeInMemoryStore,
5
4
  makeCacheableSignalKeyStore,
6
5
  fetchLatestBaileysVersion
7
6
  } from 'baileys';
@@ -11,8 +10,18 @@ import qrcode from 'qrcode-terminal';
11
10
  import EventEmitter from 'events';
12
11
  import { serialize } from '../helpers/serialize.js';
13
12
  import { PluginHandler } from '../handlers/PluginHandler.js';
13
+ import {
14
+ createSticker,
15
+ createFullSticker,
16
+ createCroppedSticker,
17
+ createCircleSticker,
18
+ createRoundedSticker,
19
+ StickerTypes
20
+ } from '../helpers/sticker.js';
14
21
 
15
22
  export class Client extends EventEmitter {
23
+ static StickerTypes = StickerTypes;
24
+
16
25
  constructor(options = {}) {
17
26
  super();
18
27
 
@@ -36,11 +45,6 @@ export class Client extends EventEmitter {
36
45
  const { state, saveCreds } = await useMultiFileAuthState(this.config.sessionId);
37
46
  const { version } = await fetchLatestBaileysVersion();
38
47
 
39
- if (this.config.useStore) {
40
- this.store = makeInMemoryStore({
41
- logger: pino().child({ level: 'silent', stream: 'store' })
42
- });
43
- }
44
48
 
45
49
  this.sock = makeWASocket({
46
50
  version,
@@ -182,9 +186,11 @@ export class Client extends EventEmitter {
182
186
  });
183
187
  }
184
188
 
189
+
185
190
  async sendSticker(jid, buffer, options = {}) {
191
+ const stickerBuffer = await createSticker(buffer, options);
186
192
  return await this.sendMessage(jid, {
187
- sticker: buffer,
193
+ sticker: stickerBuffer,
188
194
  ...options
189
195
  });
190
196
  }
package/package.json CHANGED
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "name": "@roidev/kachina-md",
3
- "version": "1.0.1",
3
+ "version": "1.1.0",
4
4
  "description": "WhatsApp Bot Framework - Simple, Fast, and Modular",
5
5
  "main": "lib/index.js",
6
6
  "type": "module",
7
7
  "scripts": {
8
8
  "build": "node build.js",
9
9
  "test": "node examples/basic-bot.js",
10
- "prepublishOnly": "npm run build"
10
+ "prepublishOnly": "npm run build",
11
+ "release": "bash scripts/release.sh"
11
12
  },
12
13
  "keywords": [
13
14
  "whatsapp",