Made the bot more generic now
This commit is contained in:
parent
c63efe5e67
commit
ad27a25d1f
8 changed files with 24 additions and 15 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue