Good News Generator
Plugin for generating good news and bad news images
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
- In the LangBot WebUI plugin management page, click the "Install" button
- Enter the plugin's GitHub repository address:
https://github.com/HwlloChen/GoodNewsGenerator - Click the "Install" button to complete installation
Method 2: Install via command
- Send
!plugin get https://github.com/HwlloChen/GoodNewsGeneratorto 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.ttffile in the plugin directory.
Common Issues
-
Issue: Plugin cannot generate images normally Solution: Check if the assets directory contains necessary background images and font files
-
Issue: Generated image text displays incorrectly Solution: Try configuring a custom font path to ensure the font supports Chinese characters
-
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.
Use Good News Generator in Feishu/Lark bots, DingTalk bots, WeCom bots, WeChat bots, QQ bots, Slack bots, Discord bots, Telegram bots, LINE Bots, and Matrix Bots.
Host your bot on LangBot Cloud and connect this extension to the collaboration platforms your team already uses.