Basic Directory Structure
A standard LangBot plugin should follow this directory structure:Multilingual README Specification
File Location Specification
LangBot plugins support multilingual README documentation to provide localized plugin descriptions for users in different languages. Important Specifications:Root README.md (Required)- Must be written in English
- Serves as the plugin’s default documentation
- Used as fallback when requested language version doesn’t exist
readme/ Directory (Optional)- Used to store non-English README documents
- File naming format:
README_{language_code}.md
Supported Language Codes
According to RFC 4646 standard, LangBot currently supports the following language codes:| Language | Language Code | Filename | Location |
|---|---|---|---|
| English | en or en_US | README.md | Plugin root directory |
| Simplified Chinese | zh_Hans | README_zh_Hans.md | readme/ directory |
| Traditional Chinese | zh_Hant | README_zh_Hant.md | readme/ directory |
| Japanese | ja_JP | README_ja_JP.md | readme/ directory |
Example Directory Structure
Incorrect Examples
❌ Wrong: Placing English README in readme/ directoryREADME Language Fallback Logic
When a user requests a README in a specific language, LangBot will search in the following order:- Try to read
readme/README_{language_code}.md - If not found, fall back to root
README.md(English version)
- User requests Simplified Chinese (
zh_Hans)- → Look for
readme/README_zh_Hans.md - → If not found, return
README.md(English version)
- → Look for
- User requests Japanese (
ja_JP)- → Look for
readme/README_ja_JP.md - → If not found, return
README.md(English version)
- → Look for
Resource Files Directory
assets/ Directory
Theassets/ directory is used to store plugin static resource files.
Recommended Structure:
- Recommended to use
icon.svgas plugin icon - Supported formats:
.svg,.png,.jpg,.jpeg,.gif - Recommended size: At least 256x256 pixels
- Reference in
manifest.yaml:icon: assets/icon.svg
Referencing Resources in README
In README documentation, you can use relative paths to reference images in the assets/ directory:Components Directory
Plugin functionality is implemented through components, which should be organized by type in thecomponents/ directory:
Configuration Files
manifest.yaml
The plugin manifest filemanifest.yaml is the core configuration file, containing plugin metadata, configuration items, component lists, and other information.
For detailed instructions, please refer to: Complete Plugin Configuration Information
requirements.txt
If the plugin requires additional Python dependencies, create arequirements.txt file in the root directory:
requirements.txt when installing the plugin.
Related Documentation
- Basic Tutorial - Learn how to create your first plugin
- Complete Plugin Configuration Information - Configure manifest.yaml
- Adding Components - Develop plugin components
- Publish to Marketplace - Distribute your plugin
