init
This commit is contained in:
11
index.ts
Normal file
11
index.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { Bot } from 'grammy';
|
||||
|
||||
import { cmdStart, cmdHelp } from './src/commands';
|
||||
|
||||
const bot = new Bot(process.env.TOKEN);
|
||||
|
||||
bot.command('start', cmdStart);
|
||||
bot.command('help', cmdHelp);
|
||||
bot.on('message', (ctx) => ctx.reply('Got another message!'));
|
||||
|
||||
bot.start();
|
||||
Reference in New Issue
Block a user