21 lines
405 B
TypeScript
21 lines
405 B
TypeScript
import { createBot } from '@/modules/bot/bot.factory'
|
|
|
|
async function main() {
|
|
console.log('Starting Telegram bot...')
|
|
try {
|
|
const bot = createBot()
|
|
console.log('Telegram bot created');
|
|
|
|
void bot.launch()
|
|
console.log('Telegram bot launched')
|
|
|
|
console.log('Telegram bot started')
|
|
} catch (e) {
|
|
console.error('Failed to start bot: ', e)
|
|
|
|
process.exit(1)
|
|
}
|
|
}
|
|
|
|
void main()
|