Nonebot2 plugin for making memes
Project description
本插件为 nonebot-plugin-memes 调用 api 版本
可以将本插件与 meme-generator 分开部署
安装
- 使用 nb-cli
nb plugin install nonebot_plugin_memes_api
- 使用 pip
pip install nonebot_plugin_memes_api
并按照 NoneBot 加载插件 加载插件
meme-generator 部署
按照 meme-generator 安装 中的说明安装,并下载图片、安装字体等
之后通过 meme run
启动 web server
配置项
以下配置项可在
.env.*
文件中设置,具体参考 NoneBot 配置方式
meme_generator_base_url
- 类型:
str
- 默认:
http://127.0.0.1:2233
- 说明:meme-generator web server 地址
memes_command_start
- 类型:
List[str]
- 默认:
[]
- 说明:命令前缀,若不配置则使用 NoneBot 命令前缀
memes_command_force_whitespace
- 类型:
bool
- 默认:
True
- 说明:是否强制要求命令后加空格(仅当命令后是文本时需要加空格)
memes_disabled_list
- 类型:
List[str]
- 默认:
[]
- 说明:禁用的表情包列表,需填写表情的
key
,可在 meme-generator 表情列表 中查看。若只是临时关闭,可以用下文中的“表情包开关”
memes_prompt_params_error
- 类型:
bool
- 默认:
False
- 说明:是否在图片/文字数量不符或参数解析错误时提示(若没有设置命令前缀不建议开启,否则极易误触发)
memes_use_sender_when_no_image
- 类型:
bool
- 默认:
False
- 说明:在表情需要至少1张图且没有输入图片时,是否使用发送者的头像(谨慎使用,容易误触发)
memes_use_default_when_no_text
- 类型:
bool
- 默认:
False
- 说明:在表情需要至少1段文字且没有输入文字时,是否使用默认文字(谨慎使用,容易误触发)
使用
使用方式与 nonebot-plugin-memes 基本一致
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for nonebot_plugin_memes_api-0.2.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5511ddca37dff44e7ed726c8e636aa61ddc524fb81bcf7e5426539886591d8c8 |
|
MD5 | c40acedcf833f71918e1215fa3617c81 |
|
BLAKE2b-256 | 67ab92492feb897e0bd1720b603dfc11b060ec108c773077aa544712a6272bbd |
Close
Hashes for nonebot_plugin_memes_api-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5a5c2f8fc1814bf42fdff04d26674c818a8cb7c4f20100534dea583e286f7029 |
|
MD5 | 40535ee122141fc755858c555e468efc |
|
BLAKE2b-256 | efc5277c1b3f8aeebb0ac1e1f560188594473bce382720415e4532c9f7450b06 |