Nonebot2 plugin for using ShindanMaker
Project description
nonebot-plugin-shindan
使用 ShindanMaker 网站的无聊趣味占卜
利用 playwright 将占卜结果转换为图片发出,因此可以显示图片、图表结果
安装
- 使用 nb-cli
nb plugin install nonebot_plugin_shindan
- 使用 pip
pip install nonebot_plugin_shindan
插件依赖 nonebot-plugin-htmlrender 插件来渲染图片,使用前需要检查 playwright 相关的依赖是否正常安装;同时为确保字体正常渲染,需要系统中存在中文字体
使用方式
默认占卜列表及对应的网站id如下:
- 今天是什么少女 (162207)
- 人设生成 (917962)
- 中二称号 (790697)
- 异世界转生 (587874)
- 特殊能力 (1098085)
- 魔法人生 (940824)
- 抽老婆 (1075116)
- 抽舰娘 (400813)
- 抽高达 (361845)
- 英灵召唤 (595068)
- 选秀剧本 (1098152)
- 卖萌 (360578)
发送 “占卜指令 名字” 即可,如:人设生成 小Q
发送 “/占卜列表” 可以查看上述列表;
超级用户可以发送 “/添加占卜 id 指令”、“/删除占卜 id” 增删占卜列表,可以发送 “/设置占卜 id image/text”设置输出形式
对于需要登录推特的占卜,可以在 .env.xxx
文件中添加 ShindanMaker cookie:
shindanmaker_cookie=xxx
cookie
获取方式:
F12
打开开发工具,查看 shindanmaker.com
请求的响应头,找形如 _session=xxx;
的片段
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
nonebot_plugin_shindan-0.2.3.1.tar.gz
(272.3 kB
view hashes)
Built Distribution
Close
Hashes for nonebot_plugin_shindan-0.2.3.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5a2751c156c071b0c6d5d0bafe9d99507b9857d59c5a040c93a550b4e789cd07 |
|
MD5 | 4a8ad59b052e5cf7dba0f7953c28a2ce |
|
BLAKE2b-256 | 3a6e8f45b8a0e3320839d73d1ff83ccdd47ef053d0eece9cb328ca7a81dd129e |
Close
Hashes for nonebot_plugin_shindan-0.2.3.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3c60fa3810bf8d59f89c33b81c4640655ba5484671b7304b6b3f5270b2e95022 |
|
MD5 | 76023a2b3bc3b8f94ab33f6f12024728 |
|
BLAKE2b-256 | 2e2b87d7ef79ee892ff9f730c9f1f2da28bcd3f245b1bb2e921d98de92453c55 |