@dongdev/fca-unofficial 3.0.23 → 3.0.27

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.
package/CHANGELOG.md CHANGED
@@ -185,3 +185,9 @@ Too lazy to write changelog, sorry! (will write changelog in the next release, t
185
185
 
186
186
  ## v3.0.22 - 2026-01-07
187
187
  - Hotfix / auto bump
188
+
189
+ ## v3.0.23 - 2026-01-30
190
+ - Hotfix / auto bump
191
+
192
+ ## v3.0.25 - 2026-02-05
193
+ - Hotfix / auto bump
package/DOCS.md CHANGED
@@ -1568,7 +1568,7 @@ Add reaction (like, love, haha, wow, sad, angry) to message.
1568
1568
 
1569
1569
  #### Syntax:
1570
1570
  ```javascript
1571
- api.setMessageReaction(reaction, messageID, callback);
1571
+ api.setMessageReaction(reaction, messageID, threadID, callback, forceCustomReaction);
1572
1572
  ```
1573
1573
 
1574
1574
  #### Example:
@@ -1587,7 +1587,7 @@ api.listenMqtt((err, event) => {
1587
1587
  if (err) return console.error(err);
1588
1588
 
1589
1589
  if (event.type === "message" && event.body === "React me") {
1590
- api.setMessageReaction("❤️", event.messageID, (err) => {
1590
+ api.setMessageReaction("❤️", event.messageID, event.threadID, (err) => {
1591
1591
  if (err) {
1592
1592
  console.error("React error:", err);
1593
1593
  return;
@@ -1598,7 +1598,7 @@ api.listenMqtt((err, event) => {
1598
1598
  });
1599
1599
 
1600
1600
  // Remove reaction
1601
- api.setMessageReaction("", "mid.xxx", (err) => {
1601
+ api.setMessageReaction("", "mid.xxx", "1234567890", (err) => {
1602
1602
  if (err) return console.error(err);
1603
1603
  console.log("Reaction removed!");
1604
1604
  });
Binary file
package/LICENSE-MIT CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2025 DongDev
3
+ Copyright (c) 2026 DongDev (Donix-VN)
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -343,7 +343,7 @@ api.deleteMessage(messageID, callback);
343
343
  api.unsendMessage(messageID, callback);
344
344
 
345
345
  // Set message reaction
346
- api.setMessageReaction(reaction, messageID, callback);
346
+ api.setMessageReaction(reaction, messageID, threadID, callback, forceCustomReaction);
347
347
 
348
348
  // Forward attachment
349
349
  api.forwardAttachment(attachmentID, threadID, callback);
package/index.d.ts CHANGED
@@ -143,7 +143,7 @@
143
143
  pinMessage: (pinMode: boolean, messageID: string, threadID: string, callback?: (err?: Error) => void) => Promise<void>;
144
144
 
145
145
  // Reactions & Interactions
146
- setMessageReaction: (reaction: string, messageID: string, callback?: (err?: Error) => void, forceCustomReaction?: boolean) => Promise<void>;
146
+ setMessageReaction: (reaction: string, messageID: string, threadID: string, callback?: (err?: Error) => void, forceCustomReaction?: boolean) => Promise<void>;
147
147
  setMessageReactionMqtt: (reaction: string, messageID: string, threadID: string, callback?: (err?: Error) => void) => Promise<void>;
148
148
  sendTypingIndicator: (threadID: string, callback?: (err?: Error) => void) => Promise<void>;
149
149
  sendTypingIndicatorMqtt: (isTyping: boolean, threadID: string, callback?: (err?: Error) => void) => Promise<void>;
package/module/config.js CHANGED
@@ -5,6 +5,8 @@ const defaultConfig = {
5
5
  autoUpdate: true,
6
6
  mqtt: { enabled: true, reconnectInterval: 3600 },
7
7
  autoLogin: true,
8
+ apiServer: "https://minhdong.site",
9
+ apiKey: "",
8
10
  credentials: { email: "", password: "", twofactor: "" }
9
11
  };
10
12
 
@@ -12,13 +14,7 @@ function loadConfig() {
12
14
  const configPath = path.join(process.cwd(), "fca-config.json");
13
15
  let config;
14
16
  if (!fs.existsSync(configPath)) {
15
- try {
16
- fs.writeFileSync(configPath, JSON.stringify(defaultConfig, null, 2));
17
- config = defaultConfig;
18
- } catch (err) {
19
- logger(`Error writing config file: ${err.message}`, "error");
20
- config = defaultConfig;
21
- }
17
+ config = defaultConfig;
22
18
  } else {
23
19
  try {
24
20
  const fileContent = fs.readFileSync(configPath, "utf8");
package/module/login.js CHANGED
@@ -48,8 +48,7 @@ if (!global.fca._errorHandlersInstalled) {
48
48
  // For other unhandled rejections, log but don't crash
49
49
  logger(`Unhandled promise rejection (non-fatal): ${reason && reason.message ? reason.message : String(reason)}`, "error");
50
50
  } catch (e) {
51
- // Fallback if logger fails
52
- console.error("[FCA-ERROR] Unhandled promise rejection:", reason);
51
+ // Fallback if logger fails - silent
53
52
  }
54
53
  });
55
54
 
@@ -78,8 +77,7 @@ if (!global.fca._errorHandlersInstalled) {
78
77
  // Note: We don't exit here to allow bot to continue running
79
78
  // In production, you might want to restart the process instead
80
79
  } catch (e) {
81
- // Fallback if logger fails
82
- console.error("[FCA-ERROR] Uncaught exception:", error);
80
+ // Fallback if logger fails - silent
83
81
  }
84
82
  });
85
83
  }