A small example package
Project description
💿 安装
1. nb-cli安装(推荐)
bot根目录下打开命令行,执行nb命令安装插件,插件配置会自动添加至配置文件
nb plugin install nonebot_plugin_face2cartoonpic
2. pip安装
pip install nonebot_plugin_face2cartoonpic --upgrade
打开 nonebot2 项目的 bot.py
文件, 在其中写入
nonebot.load_plugin('nonebot_plugin_abstain_diary')
或在bot路径pyproject.toml
的[tool.nonebot]
的plugins
中添加nonebot_plugin_face2cartoonpic
即可
pyproject.toml配置例如:
[tool.nonebot]
plugin_dirs = ["src/plugins"]
plugins = ["nonebot_plugin_face2cartoonpic","xxxxx"]
📖 配置
官方指南 https://cloud.tencent.com/document/product/1202/41796
先到腾讯云这里获取服务资源包 https://console.cloud.tencent.com/ft/resource
再去 https://console.cloud.tencent.com/cam/capi 的api密钥管理获取api密钥
bot根目录下.env文件
Secret_Id = ""这两个写从腾讯云获取的api密钥
Secret_Key = ""
FaceCartoonPic_cd_time = 60{int}默认60
🎉 使用
指令表
指令 | 需要@ | 范围 | 说明 |
---|---|---|---|
人物变换 + 图片 | 否 | 群聊/私聊 | 对发送的图片启用模型, 支持回复图片 |
使用示例:
/人物变换 <图像>
注意
默认情况下, 您应该在指令前加上命令前缀, 通常是 /
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_face2cartoonpic-0.0.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c5f33fd5f8d1732b03b090342dd7cf55ceb9dc1bf907cdd2aa85df5288783156 |
|
MD5 | 7ad6b1e90bf6b4473acd5f02c5b54da7 |
|
BLAKE2b-256 | a0c4ce1f2edfcf01f2e793ad7681c433f6c8cdfb70278f2d1c632693e1d554f9 |
Close
Hashes for nonebot_plugin_face2cartoonpic-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | be0906dd83d2f1e02ea695ff65603a1e95ffde24a9dfd29f321ce49c8225f7ca |
|
MD5 | dc620bc4e8df21b55dcc42d45fd69487 |
|
BLAKE2b-256 | 2a984310a3cdfc3884bfecf9debd0b450a406efed52d48089adaecc9b56e1002 |