Набросал меню
This commit is contained in:
@@ -1,11 +1,16 @@
|
||||
import { Bot } from 'grammy';
|
||||
|
||||
import { cmdStart, cmdHelp } from './src/commands';
|
||||
import { menu } from './src/menu';
|
||||
|
||||
const bot = new Bot(process.env.TOKEN);
|
||||
bot.use(menu);
|
||||
|
||||
bot.command('start', cmdStart);
|
||||
bot.command('help', cmdHelp);
|
||||
bot.command('menu', async (ctx) => {
|
||||
await ctx.reply('🛣️ Навигация', { reply_markup: menu });
|
||||
});
|
||||
bot.on('message', (ctx) => ctx.reply('Got another message!'));
|
||||
|
||||
bot.start();
|
||||
|
||||
Reference in New Issue
Block a user