米游社原神cos图获取
Project description
nonebot-plugin-genshin-cos
⭐基于Nonebot2的一款获取米游社cos的插件⭐
⭐ 介绍
受到教程的启发,所以写了这个插件,更多功能后续更新我很懒,学业重
或者你有啥关于该插件的新想法的,可以提issue或者pr (>A<)
💿 安装
安装
pip 安装
pip install nonebot-plugin-genshin-cos
- 在nonebot的pyproject.toml中的plugins = ["xxx"]添加此插件
nb-cli安装
nb plugin install nonebot-plugin-genshin-cos --upgrade
git clone安装(不推荐)
- 运行
git clone https://github.com/Cvandia/nonebot_plugin_genshin_cos
- 在运行处
把文件夹
nonebot-plugin-genshen-cos
复制到bot根目录下的src/plugins
(或者你创建bot时的其他名称xxx/plugins
)
注意
推荐镜像站下载
清华源https://pypi.tuna.tsinghua.edu.cn/simple
阿里源https://mirrors.aliyun.com/pypi/simple/
安装完后记得执行一下:
playwright install
懒,没写自动下载chrome
⚙️ 配置
在env.中添加以下配置
配置 | 类型 | 默认值 | 说明 |
---|---|---|---|
cos_max | int | 5 | 最大返回cos图片数量 |
cos_path | str | 无 | 不配置则默认下载到bot根目录的"data/genshin_cos" ,支持绝对路劲如"C:/Users/image" 和相对bot根目录路劲如"coser/image" |
cos_cd | int | 30 | 用户触发cd |
cos_time_out | int | 60 | cosplus用户超时时间 |
cos_swipe_time | int | 1 | 获取页面的时间,时间越长图片越多 |
注意:绝对路劲中用
/
,用\
可能会被转义
⭐ 使用
指令:
指令 | 需要@ | 范围 | 说明 | 权限 |
---|---|---|---|---|
原神cos | 否 | 私聊、群聊 | 随机发送x张cos图,如:米游社cos x3 | 任何 |
下载cos | 否 | 私聊、群聊 | 爬取cos图片至本地,如:下载cos | 超管 |
cosplus | 否 | 私聊、群聊 | 通过playwright获取cos图 | 任何 |
xmx | 否 | 私聊、群聊 | ?????s | 超管 |
注意 |
指令触发方式是正则匹配的,不需要加指令前缀
🌙 未来
- 缓慢更新,最近学业繁忙哦~
- 随机发送cos图片
- 保存cos图
- 内置cd和用户触发上限
- 合并转发发送多张cos图
- playwright获取cos图
- 选择发送图库方式:离线 (迅速) or 在线(缓慢、目前是的)
--- 喜欢记得点个star⭐---
❗免责声明
图片版权归米游社原神cos社区所属,请尊重 coser的创作权
💝 鸣谢
- Nonebot: 本项目的基础,非常好用的聊天机器人框架。
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_genshin_cos-0.1.6.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 23e5c4c5768019557c9c9b71dbbda2b8b1c222f0073489587d5acd29a5aa144d |
|
MD5 | a24eef4902635a567f75293a61cca59e |
|
BLAKE2b-256 | c193e2a02e6d7ed0172858cbf646fb78ddd5a8d02e32d2163f1a85d27a61a0b4 |
Close
Hashes for nonebot_plugin_genshin_cos-0.1.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d2b80c1bfb69b31c7300d155d770681d80dd6a6727560a042e7f9ad2587d91e3 |
|
MD5 | 207c41cfb4ec20438f888c485f16d545 |
|
BLAKE2b-256 | 3e91112107c02bdcaa07523ddfcffc5c2456485da79b8881935cbf9d4deaec41 |