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
getMainBot
Usage:
Returns:
{TelegramBot|undefined}
: Returns the main bot instance if it exists, orundefined
if no main bot is set.
Example:
Notes:
This method is only available for configurations where
type
is "one". If the type is "multi", this method will not function as intended.Ensure that the main bot is properly initialized and set in the configuration.
The method returns
undefined
if no bot is designated as the main bot in the current setup.
Last updated