balanceofsatoshis 11.45.1 → 11.46.0
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 +4 -0
- package/package.json +2 -2
- package/telegram/start_telegram_bot.js +19 -0
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"ln-accounting": "5.0.5",
|
|
38
38
|
"ln-service": "53.6.0",
|
|
39
39
|
"ln-sync": "3.9.0",
|
|
40
|
-
"ln-telegram": "3.
|
|
40
|
+
"ln-telegram": "3.13.0",
|
|
41
41
|
"moment": "2.29.1",
|
|
42
42
|
"paid-services": "3.11.0",
|
|
43
43
|
"probing": "2.0.2",
|
|
@@ -81,5 +81,5 @@
|
|
|
81
81
|
"postpublish": "docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t alexbosworth/balanceofsatoshis --push .",
|
|
82
82
|
"test": "tap --branches=1 --functions=1 --lines=1 --statements=1 -t 60 test/arrays/*.js test/balances/*.js test/chain/*.js test/display/*.js test/encryption/*.js test/lnd/*.js test/network/*.js test/nodes/*.js test/peers/*.js test/responses/*.js test/routing/*.js test/services/*.js test/swaps/*.js test/tags/*.js test/wallets/*.js"
|
|
83
83
|
},
|
|
84
|
-
"version": "11.
|
|
84
|
+
"version": "11.46.0"
|
|
85
85
|
}
|
|
@@ -25,6 +25,7 @@ const {handleMempoolCommand} = require('ln-telegram');
|
|
|
25
25
|
const {handlePayCommand} = require('ln-telegram');
|
|
26
26
|
const {handlePendingCommand} = require('ln-telegram');
|
|
27
27
|
const {handleStartCommand} = require('ln-telegram');
|
|
28
|
+
const {handleStopCommand} = require('ln-telegram');
|
|
28
29
|
const {handleVersionCommand} = require('ln-telegram');
|
|
29
30
|
const {InputFile} = require('grammy');
|
|
30
31
|
const inquirer = require('inquirer');
|
|
@@ -272,6 +273,7 @@ module.exports = (args, cbk) => {
|
|
|
272
273
|
{command: 'mempool', description: 'Get info about the mempool'},
|
|
273
274
|
{command: 'pay', description: 'Pay a payment request'},
|
|
274
275
|
{command: 'pending', description: 'Get pending forwards, channels'},
|
|
276
|
+
{command: 'stop', description: 'Stop the bot'},
|
|
275
277
|
{command: 'version', description: 'View current bot version'},
|
|
276
278
|
]);
|
|
277
279
|
|
|
@@ -457,6 +459,22 @@ module.exports = (args, cbk) => {
|
|
|
457
459
|
});
|
|
458
460
|
});
|
|
459
461
|
|
|
462
|
+
// Terminate the running bot
|
|
463
|
+
bot.command('stop', async ctx => {
|
|
464
|
+
try {
|
|
465
|
+
await handleStopCommand({
|
|
466
|
+
from: ctx.message.from.id,
|
|
467
|
+
id: connectedId,
|
|
468
|
+
quit: () => bot.stop(),
|
|
469
|
+
reply: (msg, mode) => ctx.reply(msg, mode),
|
|
470
|
+
});
|
|
471
|
+
|
|
472
|
+
process.exit();
|
|
473
|
+
} catch (err) {
|
|
474
|
+
logger.error({err});
|
|
475
|
+
}
|
|
476
|
+
});
|
|
477
|
+
|
|
460
478
|
bot.command('version', async ctx => {
|
|
461
479
|
try {
|
|
462
480
|
await handleVersionCommand({
|
|
@@ -481,6 +499,7 @@ module.exports = (args, cbk) => {
|
|
|
481
499
|
'/mempool - BTC mempool report',
|
|
482
500
|
'/pay - Pay an invoice',
|
|
483
501
|
'/pending - View pending channels, probes, and forwards',
|
|
502
|
+
'/stop - Stop bot',
|
|
484
503
|
'/version - View the current bot version',
|
|
485
504
|
];
|
|
486
505
|
|