File size: 358 Bytes
9926b6a
7811b06
430796e
7811b06
430796e
 
73c3a84
 
 
 
 
 
 
 
 
430796e
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import { Bot } from 'grammy';
import { BotToken } from "../config.js";

const bot = new Bot(BotToken);

function InitBot() {
  try {
    bot.command("start", (ctx) => {
      ctx.reply("Welcome to the bot! 🚀");
    });
    bot.start();
    console.log("Bot is running...");
  } catch (e) {
    console.error("Error", e.message);
  }
}

export { InitBot };