Made the bot more generic now

This commit is contained in:
Luquinhas 2025-01-10 10:40:18 -03:00
parent c63efe5e67
commit ad27a25d1f
No known key found for this signature in database
GPG key ID: D9B075FC6DC93985
8 changed files with 24 additions and 15 deletions

View file

@ -31,9 +31,10 @@ const loadCommands = () => {
};
const startBot = async () => {
const botInfo = await bot.telegram.getMe();
console.log(`${botInfo.first_name} is running...`);
try {
await bot.launch();
console.log('Bot is running...');
restartCount = 0;
} catch (error) {
console.error('Failed to start bot:', error.message);