getBotById
The getBotById method retrieves a bot instance based on its unique ID. This method is applicable only for configurations of type "multi".
Method getBotById
getBotByIdconst bot = multiBotInstance.getBotById(id);const bot = multiBotInstance.getBotById(1234567890);
if (bot) {
bot.sendMessage(chatId, 'Hello!');
} else {
console.log('Bot not found.');
}Last updated