2023-11-12 18:25:33 +00:00
|
|
|
import { env } from "#root/env.js";
|
|
|
|
import { removeKeyboardFeature } from "#root/features/remove-keyboard.js";
|
|
|
|
import { welcomeFeature } from "#root/features/welcome.js";
|
2023-11-01 17:47:10 +00:00
|
|
|
import { logger } from "#root/logger.js";
|
2023-11-12 18:25:33 +00:00
|
|
|
import { Bot } from "grammy";
|
2023-11-01 17:47:10 +00:00
|
|
|
|
2023-11-12 18:25:33 +00:00
|
|
|
const bot = new Bot(env.TOKEN);
|
|
|
|
|
|
|
|
bot.use(welcomeFeature);
|
|
|
|
bot.use(removeKeyboardFeature);
|
|
|
|
|
|
|
|
bot.start({
|
|
|
|
onStart: ({ username }) =>
|
|
|
|
logger.info({
|
|
|
|
msg: "bot running...",
|
|
|
|
username,
|
|
|
|
}),
|
|
|
|
drop_pending_updates: true
|
|
|
|
});
|