Create bot/telegrambot.js
Browse files- bot/telegrambot.js +12 -0
bot/telegrambot.js
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
const { Bot } = from "grammy";
|
2 |
+
|
3 |
+
const bot = new Bot("");
|
4 |
+
|
5 |
+
bot.on("/start", (ctx) => ctx.reply("Hi there!"));
|
6 |
+
|
7 |
+
function InitBot() {
|
8 |
+
bot.start();
|
9 |
+
console.log("Starting Bot")
|
10 |
+
}
|
11 |
+
|
12 |
+
export { InitBot };
|