@locusai/telegram 0.14.1 → 0.14.2
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/bin/telegram.js +6 -1
- package/package.json +3 -3
package/bin/telegram.js
CHANGED
|
@@ -45491,6 +45491,7 @@ async function upgradeCommand(ctx) {
|
|
|
45491
45491
|
<pre>${escapeHtml(truncated)}</pre>`, { parse_mode: "HTML" });
|
|
45492
45492
|
return;
|
|
45493
45493
|
}
|
|
45494
|
+
const packagesUpdated = output.includes("updated to");
|
|
45494
45495
|
if (output) {
|
|
45495
45496
|
const truncated = truncateOutput(output, 3000);
|
|
45496
45497
|
await ctx.reply(`${formatSuccess("Upgrade completed:")}
|
|
@@ -45501,6 +45502,10 @@ async function upgradeCommand(ctx) {
|
|
|
45501
45502
|
parse_mode: "HTML"
|
|
45502
45503
|
});
|
|
45503
45504
|
}
|
|
45505
|
+
if (!packagesUpdated) {
|
|
45506
|
+
await ctx.reply(formatInfo("All packages already at latest version. No restart needed."), { parse_mode: "HTML" });
|
|
45507
|
+
return;
|
|
45508
|
+
}
|
|
45504
45509
|
await ctx.reply(formatInfo(`Restarting locus-telegram via ${restartInfo.label}... The bot will be back shortly.`), { parse_mode: "HTML" });
|
|
45505
45510
|
for (const { cmd, args } of restartInfo.commands) {
|
|
45506
45511
|
console.log(`[upgrade] Running: ${cmd} ${args.join(" ")}`);
|
|
@@ -45915,7 +45920,7 @@ Received ${signal}. Shutting down...`);
|
|
|
45915
45920
|
process.on("SIGTERM", () => shutdown("SIGTERM"));
|
|
45916
45921
|
console.log(`Starting bot (long-polling)...
|
|
45917
45922
|
`);
|
|
45918
|
-
await bot.launch();
|
|
45923
|
+
await bot.launch({ dropPendingUpdates: true });
|
|
45919
45924
|
console.log(`Bot is running. Send /help in Telegram to get started.
|
|
45920
45925
|
`);
|
|
45921
45926
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@locusai/telegram",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.2",
|
|
4
4
|
"description": "Telegram bot for Locus - remote control your AI agents from Telegram",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"author": "",
|
|
32
32
|
"license": "MIT",
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@locusai/sdk": "^0.14.
|
|
35
|
-
"@locusai/shared": "^0.14.
|
|
34
|
+
"@locusai/sdk": "^0.14.2",
|
|
35
|
+
"@locusai/shared": "^0.14.2",
|
|
36
36
|
"dotenv": "^16.4.7",
|
|
37
37
|
"telegraf": "^4.16.3"
|
|
38
38
|
},
|