Skip to content

Commit b1c3b61

Browse files
committed
feat: version command
1 parent 20e473e commit b1c3b61

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

source/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import Telegraf from 'telegraf';
22
import { fork } from 'child_process';
33
import { join } from 'path';
4+
import * as pkg from '../package.json';
45
import send from './utils/send';
56
import logger from './utils/logger';
67
import errors from './utils/errors';
@@ -250,6 +251,10 @@ bot.action(
250251
rss
251252
);
252253

254+
bot.command('version', async (ctx) => {
255+
ctx.reply(`${pkg.version}`);
256+
});
257+
253258
bot.launch();
254259

255260
async function startFetchProcess(restartTime: number): Promise<void> {

0 commit comments

Comments
 (0)