@inetafrica/open-claudia 1.1.9 → 1.2.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.
- package/bot.js +8 -1
- package/package.json +1 -1
package/bot.js
CHANGED
|
@@ -93,9 +93,10 @@ const BOT_DIR = __dirname;
|
|
|
93
93
|
// Detect PATH for subprocess
|
|
94
94
|
const FULL_PATH = [
|
|
95
95
|
path.dirname(CLAUDE_PATH),
|
|
96
|
+
path.dirname(process.execPath),
|
|
96
97
|
FFMPEG ? path.dirname(FFMPEG) : null,
|
|
97
98
|
WHISPER_CLI ? path.dirname(WHISPER_CLI) : null,
|
|
98
|
-
"/usr/local/bin", "/usr/bin", "/bin", "/usr/sbin", "/sbin",
|
|
99
|
+
"/opt/homebrew/bin", "/usr/local/bin", "/usr/bin", "/bin", "/usr/sbin", "/sbin",
|
|
99
100
|
].filter(Boolean).join(":");
|
|
100
101
|
|
|
101
102
|
const bot = new TelegramBot(TOKEN, {
|
|
@@ -172,6 +173,7 @@ bot.setMyCommands([
|
|
|
172
173
|
{ command: "status", description: "Session & settings info" },
|
|
173
174
|
{ command: "stop", description: "Cancel running task" },
|
|
174
175
|
{ command: "end", description: "End current session" },
|
|
176
|
+
{ command: "version", description: "Show current version" },
|
|
175
177
|
{ command: "restart", description: "Restart the bot" },
|
|
176
178
|
{ command: "upgrade", description: "Upgrade and restart" },
|
|
177
179
|
{ command: "help", description: "Show all commands" },
|
|
@@ -820,6 +822,11 @@ bot.onText(/\/help/, (msg) => {
|
|
|
820
822
|
].join("\n"));
|
|
821
823
|
});
|
|
822
824
|
|
|
825
|
+
bot.onText(/\/version$/, (msg) => {
|
|
826
|
+
if (!isAuthorized(msg)) return;
|
|
827
|
+
send(`Open Claudia v${CURRENT_VERSION}`);
|
|
828
|
+
});
|
|
829
|
+
|
|
823
830
|
bot.onText(/\/restart$/, async (msg) => {
|
|
824
831
|
if (!isOwner(msg)) return;
|
|
825
832
|
await send("Restarting...");
|