@inetafrica/open-claudia 1.1.5 → 1.1.6

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/bot.js +2 -21
  2. package/package.json +1 -1
package/bot.js CHANGED
@@ -797,13 +797,7 @@ bot.onText(/\/help/, (msg) => {
797
797
  bot.onText(/\/restart$/, async (msg) => {
798
798
  if (!isOwner(msg)) return;
799
799
  await send("Restarting...");
800
- const botPath = path.join(__dirname, "bot.js");
801
- const child = spawn(process.execPath, [botPath], {
802
- detached: true,
803
- stdio: "ignore",
804
- env: { ...process.env, PATH: FULL_PATH },
805
- });
806
- child.unref();
800
+ releaseLock();
807
801
  setTimeout(() => process.exit(0), 500);
808
802
  });
809
803
 
@@ -822,20 +816,7 @@ bot.onText(/\/upgrade$/, async (msg) => {
822
816
  await send(`Upgrade failed: ${e.message}`);
823
817
  return;
824
818
  }
825
- // Restart with the new code — resolve fresh path from npm
826
- let botPath;
827
- try {
828
- const root = execSync("npm root -g", { encoding: "utf-8" }).trim();
829
- botPath = path.join(root, "@inetafrica", "open-claudia", "bot.js");
830
- } catch (e) {
831
- botPath = path.join(__dirname, "bot.js");
832
- }
833
- const child = spawn(process.execPath, [botPath], {
834
- detached: true,
835
- stdio: "ignore",
836
- env: { ...process.env, PATH: FULL_PATH },
837
- });
838
- child.unref();
819
+ releaseLock();
839
820
  setTimeout(() => process.exit(0), 500);
840
821
  });
841
822
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inetafrica/open-claudia",
3
- "version": "1.1.5",
3
+ "version": "1.1.6",
4
4
  "description": "Your always-on AI coding assistant — Claude Code via Telegram",
5
5
  "main": "bot.js",
6
6
  "bin": {