catto.js 1.2.9 → 1.3.1

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.
@@ -30,13 +30,14 @@ module.exports = class {
30
30
  if (data instanceof TelegramMessageBuilder) {
31
31
  data = data.data;
32
32
  }
33
- if (data.media) {
33
+ if (data.media && data.media.length) {
34
34
  await this.bot.client.telegram.sendMediaGroup(this.id, data.media.map((media, index) => {
35
35
  if (index < 1) {
36
36
  return {
37
37
  "type": (media.type == "image") ? "photo" : media.type,
38
38
  "media": media.url,
39
39
  "caption": data.content,
40
+ "parse_mode": data.parseMode,
40
41
  "show_caption_above_media": data.textAbove
41
42
  };
42
43
  }
@@ -53,7 +54,8 @@ module.exports = class {
53
54
  } : void 0,
54
55
  "reply_markup": data.replyMarkup ? data.replyMarkup : {
55
56
  "remove_keyboard": !0
56
- }
57
+ },
58
+ "parse_mode": data.parseMode
57
59
  }, data.extra));
58
60
  } else {
59
61
  await this.bot.client.telegram.sendMessage(this.id, data.content, Object.assign({
@@ -100,3 +102,5 @@ module.exports = class {
100
102
 
101
103
 
102
104
 
105
+
106
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "catto.js",
3
- "version": "1.2.9",
3
+ "version": "1.3.1",
4
4
  "description": "Universal module for everything.",
5
5
  "main": "index.js",
6
6
  "scripts": {