getMainBot
The getMainBot method retrieves the main bot instance from the current configuration. This method is designed to work only for configurations of type "one".
Method getMainBot
getMainBotconst mainBot = multiBotInstance.getMainBot();const mainBot = multiBotInstance.getMainBot();
if (mainBot) {
mainBot.sendMessage(chatId, 'Hello from the main bot!');
} else {
console.log('No main bot found.');
}Last updated