# Good News/Bad News Generator LangBot Plugin ## Introduction The Good News/Bad News Generator is a LangBot plugin that can generate and send good news or bad news style images based on keywords. When users send messages starting with "喜报" (good news) or "悲报" (bad news) in private or group chats, the plugin automatically generates corresponding images and sends them.    ## Features - Supports both private and group chat scenarios - Automatically recognizes "喜报" and "悲报" keywords - Generates corresponding style images based on user input content - Adaptive text layout, supports long text and special characters - Comprehensive exception handling mechanism ## Installation Methods ### Method 1: Install from WebUI 1. In the LangBot WebUI plugin management page, click the "Install" button 2. Enter the plugin's GitHub repository address: `https://github.com/HwlloChen/GoodNewsGenerator` 3. Click the "Install" button to complete installation ### Method 2: Install via command 1. Send `!plugin get https://github.com/HwlloChen/GoodNewsGenerator` to install ## Usage After the plugin is installed, it can be used in the following ways: ### Generate Good News Send in private or group chat: ``` 喜报 [your content] ``` Example: ``` 喜报 Congratulations on getting rich! ``` ### Generate Bad News Send in private or group chat: ``` 悲报 [your content] ``` Example: ``` 悲报 Today is a sad day ``` ## Configuration Options The plugin supports the following configuration options: - `font_path`: Custom font path for text rendering (optional), defaults to Noto Sans font These configurations can be modified in the LangBot WebUI plugin management page. > Due to testing on LangBot 3 by the author, this feature is not yet implemented. Please manually change the `assets/font.ttf` file in the plugin directory. ## Common Issues 1. **Issue**: Plugin cannot generate images normally **Solution**: Check if the assets directory contains necessary background images and font files 2. **Issue**: Generated image text displays incorrectly **Solution**: Try configuring a custom font path to ensure the font supports Chinese characters 3. **Issue**: Plugin does not respond to keywords **Solution**: Ensure the message format is correct, with a space after the keyword ## License This plugin is open source under the MIT License.
Good News Generator by Typer_Body
Plugin for generating good news and bad news images
Loading...