first commit

This commit is contained in:
2026-08-09 16:53:38 +03:00
commit e92e0df644
28 changed files with 1143 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
/**
* Отправляет список команд в Telegram, не поднимая бота.
*
* npm run sync
*/
import { Bot } from 'grammy';
import { assertConfig, config } from '../src/config.js';
import { loadCommands } from '../src/core/loader.js';
assertConfig();
const registry = await loadCommands();
const bot = new Bot(config.token);
const commands = registry.forTelegram();
await bot.api.setMyCommands(commands);
console.log(`Готово. Отправлено команд: ${commands.length}`);