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

const bot = new Bot(BotToken);

bot.command("start", (ctx) => {
  ctx.reply("Welcome to the bot! 🚀");
});

const InitBot = function () {
  try {
    bot.start();
    console.log("Bot is running...");
  } catch (e) {
    console.error("Error", e.message);
  }
}

export { InitBot };