19 lines
503 B
TypeScript
19 lines
503 B
TypeScript
import { env } from "#root/env.js";
|
|
import { removeKeyboardFeature } from "#root/features/remove-keyboard.js";
|
|
import { welcomeFeature } from "#root/features/welcome.js";
|
|
import { logger } from "#root/logger.js";
|
|
import { Bot } from "grammy";
|
|
|
|
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
|
|
}); |