"""
{{BOT_NAME_TITLE}} - A Telegram bot built with Mothership

This is a template for creating new Telegram bots.
Replace this description with your bot's purpose.
"""

from mothership_bot import BotDefinition, Context, create_logger

# Create logger for this bot
logger = create_logger('{{BOT_NAME}}')

# Define your bot
bot: BotDefinition = {
    'config': {
        'name': '{{BOT_NAME}}',
        'description': '{{BOT_NAME_TITLE}} - A Telegram bot'
    },
    'commands': [
        {
            'command': 'start',
            'description': 'Start the bot',
            'handler': lambda ctx: ctx.reply(
                f"Hello {ctx.from_user.first_name or 'there'}! 👋\n\n"
                f"I'm {{BOT_NAME_TITLE}}. Use /help to see what I can do."
            )
        },
        {
            'command': 'help',
            'description': 'Show help message',
            'handler': lambda ctx: ctx.reply(
                '📚 *Available Commands*\n\n'
                '/start - Start the bot\n'
                '/help - Show this help message\n'
                '/about - About this bot',
                parse_mode='Markdown'
            )
        },
        {
            'command': 'about',
            'description': 'About this bot',
            'handler': lambda ctx: ctx.reply(
                '🤖 *{{BOT_NAME_TITLE}}*\n\n'
                'Built with mothership-bot\n\n'
                'Edit `bots/{{BOT_NAME}}/__init__.py` to customize this bot.',
                parse_mode='Markdown'
            )
        }
    ],
    'message_handlers': [
        {
            'pattern': r'hello',
            'handler': lambda ctx: ctx.reply('Hello! 👋 Use /help to see available commands.')
        }
    ],
    'on_start': lambda: logger.info('🤖 {{BOT_NAME_TITLE}} is starting...'),
    'on_stop': lambda: logger.info('🤖 {{BOT_NAME_TITLE}} is stopping...')
}
