File size: 374 Bytes
9926b6a
7811b06
430796e
7811b06
430796e
fdaf73e
 
db01d45
 
89182c5
73c3a84
fdaf73e
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", async (ctx) => {
  await ctx.reply("Welcome to the bot! 🚀");
});

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

export { InitBot };