@roidev/kachina-md 1.0.2 → 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.
@@ -10,8 +10,18 @@ import qrcode from 'qrcode-terminal';
10
10
  import EventEmitter from 'events';
11
11
  import { serialize } from '../helpers/serialize.js';
12
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';
13
21
 
14
22
  export class Client extends EventEmitter {
23
+ static StickerTypes = StickerTypes;
24
+
15
25
  constructor(options = {}) {
16
26
  super();
17
27
 
@@ -176,9 +186,11 @@ export class Client extends EventEmitter {
176
186
  });
177
187
  }
178
188
 
189
+
179
190
  async sendSticker(jid, buffer, options = {}) {
191
+ const stickerBuffer = await createSticker(buffer, options);
180
192
  return await this.sendMessage(jid, {
181
- sticker: buffer,
193
+ sticker: stickerBuffer,
182
194
  ...options
183
195
  });
184
196
  }
package/package.json CHANGED
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "name": "@roidev/kachina-md",
3
- "version": "1.0.2",
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",