This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Bot Cat is a WordPress plugin that sends automated chatbot notifications via LINE, Telegram, and Slack when specific WordPress events occur.
The plugin uses PSR-4 autoloading with the BotCat namespace:
- Entry Point:
bot-cat.php- Main plugin file - Core Classes:
BotCatInitializer: Central initialization class in includes/BotCatInitializer.phpBotCatConstants: Plugin constants in includes/BotCatConstants.php
- Directory Structure:
/includes/Api/: REST API endpoints for OAuth authentication/includes/Service/: Business logic for each platform and core services/includes/View/: Admin interface and frontend components
Currently, there are no build, test, or lint commands configured. Development tasks:
# Install dependencies (if any are added)
composer install
# Update autoloader after adding new classes
composer dump-autoload- WordPress Hooks: Posts, comments, and user registration events
- REST API Routes: OAuth callbacks for each platform
- Shortcode:
[bot-cat-oauth]for OAuth authentication buttons
- PHP 8.2+
- WordPress 6.4.2+
- Requires API key from bot-cat.com console
-
Service Layer: Platform-specific implementations in
/includes/Service/:BotCatLineService.php: LINE messagingBotCatTelegramService.php: Telegram messagingBotCatSlackService.php: Slack messagingBotCatNotificationService.php: Core notification dispatch
-
API Layer: OAuth endpoints in
/includes/Api/:- Each platform has its own authentication API class
BotCatMessageApi.php: Handles incoming messages
-
Views: Admin panels in
/includes/View/:- Platform-specific admin views for configuration
- Partial views for reusable components