Skip to main content

米游社原神cos图获取

Project description

NoneBotPluginLogo

nonebot-plugin-genshin-cos

⭐基于Nonebot2的一款获取米游社cos的插件⭐

⭐ 介绍

受到教程的启发,根据原文基础上修改编写出本插件,若你不是Nonebot用户,并且想使用米游社cos相关内容,请参考以下内容

目前不仅有原神,现在支持崩坏3、星穹铁道、大别野、绝区零的cos图!

💿 安装

安装

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/

⚙️ 配置

在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_forward_msg bool True 默认是否合并转发
cos_delay float 0.5 当上面的配置项为False时,发送图片的每张延迟s

注意:绝对路劲中用/,用\可能会被转义

⭐ 使用

指令:

指令 需要@ 范围 说明 权限
下载cos 群聊、私聊 下载热门cos图 超管、群主、管理员
热门cos 同上 获取指定游戏热门cos图,如热门cos 原神 x3 全部
日、周、月榜cos 同上 获取排行榜cos图。如日榜cos 原神 x3 全部
最新cos 同上 和上面差不多,不写了,哼哼 全部
精品cos 同上 上上面一样的道理! 全部
搜索(原神|崩坏3|星穹铁道|大别野|绝区零)cos 同上 搜索米游社社区的cos图片
例:
搜索原神cos甘雨
搜索崩坏3cos图德丽莎
全部
开启每日推送xx (时间) 仅群聊 开启每日推送原神 8:30,注意时间的格式 超管、群主、管理员
查看本群推送 群聊 查看本群的订阅cos目录 全部

注意

指令触发方式是正则匹配的,不需要加指令前缀

🌙 未来

  • 缓慢更新,最近学业繁忙哦~
  • 随机发送cos图片
  • 保存cos图
  • 内置cd和用户触发上限
  • 合并转发发送多张cos图

playwright获取cos图 选择发送图库方式:离线 (迅速) or 在线(缓慢、目前是的)

  • 支持米游社其他社区cos获取
  • 支持每日推送热榜的cos图

--- 喜欢记得点个star⭐---

❗免责声明

图片版权归米游社原神cos社区所属,请尊重 coser的创作权

💝 特别鸣谢

  • Nonebot: 本项目的基础,非常好用的聊天机器人框架。
  • @qxdn:感谢qxdn的博客文章,有兴趣大家也去看看咯

Project details


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_genshin_cos-0.3.5.tar.gz (14.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nonebot_plugin_genshin_cos-0.3.5-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

Details for the file nonebot_plugin_genshin_cos-0.3.5.tar.gz.

File metadata

File hashes

Hashes for nonebot_plugin_genshin_cos-0.3.5.tar.gz
Algorithm Hash digest
SHA256 bd7f0ef93a2fba2bed46c52dc86449bf7717ff63e734b75fdf2fd57457ce43ae
MD5 94fc6854c93d4d3e5f5b75ca9d61ca1b
BLAKE2b-256 1e8c346cee9b293e2e0939c13ef53ae2ae329349ff6e41a96b436bb75379ef33

See more details on using hashes here.

File details

Details for the file nonebot_plugin_genshin_cos-0.3.5-py3-none-any.whl.

File metadata

File hashes

Hashes for nonebot_plugin_genshin_cos-0.3.5-py3-none-any.whl
Algorithm Hash digest
SHA256 06c5d338c54b93a637aae3cda4d1a6688181e47b41146868b134eb733240713d
MD5 2b194025b660fb2966d8d603c1582492
BLAKE2b-256 01b37b39e1dbf30e8ba2df3281e2dfe66c6ec576af49d1c6cd1d03e26379fd63

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page