Skip to main content

一个基于 `OneBot v11` 的 NoneBot2 QQ 点赞插件。

Project description

logo

✨ nonebot-plugin-sublike ✨

LICENSE pypi python uv
ruff pre-commit

📖 介绍

一个基于 OneBot v11 的 NoneBot2 QQ 点赞插件。

当前已支持:

  • 即时点赞自己
  • 即时点赞群内其他人
  • 每日赞
  • 每日赞续期、关闭、状态查询
  • 按运行时段轮询每日赞用户,并在执行前加入随机延迟

此外还提供以下个性化配置能力:

  • 自定义“赞我”“赞他”“每日赞”等触发词
  • 控制即时点赞、每日赞是否要求好友关系
  • 控制是否允许即时点赞他人
  • 配置每日赞有效期、扫描间隔、运行时段和最大随机延迟
  • 配置禁用插件命令的群号列表

💿 安装

使用 nb-cli 安装 在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装
nb plugin install nonebot-plugin-sublike --upgrade

使用 pypi 源安装

nb plugin install nonebot-plugin-sublike --upgrade -i "https://pypi.org/simple"

使用清华源安装

nb plugin install nonebot-plugin-sublike --upgrade -i "https://pypi.tuna.tsinghua.edu.cn/simple"
使用包管理器安装 在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令
uv
uv add nonebot-plugin-sublike

安装仓库 master 分支

uv add git+https://github.com/ByteColtX/nonebot-plugin-sublike@master
pdm
pdm add nonebot-plugin-sublike

安装仓库 master 分支

pdm add git+https://github.com/ByteColtX/nonebot-plugin-sublike@master
poetry
poetry add nonebot-plugin-sublike

安装仓库 master 分支

poetry add git+https://github.com/ByteColtX/nonebot-plugin-sublike@master

打开 nonebot2 项目根目录下的 pyproject.toml 文件, 在 [tool.nonebot] 部分追加写入

plugins = ["nonebot_plugin_sublike"]
使用 nbr 安装(使用 uv 管理依赖可用)

nbr 是一个基于 uv 的 nb-cli,可以方便地管理 nonebot2

nbr plugin install nonebot-plugin-sublike

使用 pypi 源安装

nbr plugin install nonebot-plugin-sublike -i "https://pypi.org/simple"

使用清华源安装

nbr plugin install nonebot-plugin-sublike -i "https://pypi.tuna.tsinghua.edu.cn/simple"

⚙️ 配置

在 nonebot2 项目的 .env 文件中添加下表中的配置

配置项 必填 默认值 说明
sublike_cmd_me ["赞我", "草我", "超我"] 即时点赞自己的触发词
sublike_cmd_other ["赞ta", "赞TA", "赞他", "赞她", "草ta", "草TA", "草他", "草她"] 即时点赞他人的触发词
sublike_cmd_sub ["每日赞", "天天赞我"] 每日赞触发词
sublike_cmd_unsub ["取消每日赞", "每日赞取消"] 关闭每日赞触发词
sublike_cmd_status ["每日赞查看", "查看每日赞", "每日赞状态", "每日赞查询", "查询每日赞"] 每日赞状态查询触发词
sublike_need_friend_me false 即时点赞是否要求好友关系
sublike_need_friend_sub true 每日赞是否要求好友关系
sublike_allow_other true 是否允许即时点赞他人
sublike_sub_expire_days 7 每日赞有效期天数,需在过期前再次触发命令续期
sublike_sched_interval 60 定时扫描间隔,单位分钟
sublike_sched_start 8 定时任务开始小时
sublike_sched_end 0 定时任务结束小时,0 表示次日 00:00
sublike_delay_max 2 单个每日赞用户执行前的最大随机延迟,单位分钟
sublike_banned_groups [] 禁用插件命令的群号列表

🎉 使用

指令表

指令 权限 需要@ 范围 说明
赞我 群员 群聊 / 私聊 给发送者点赞直到当日上限
赞他 @用户 群员 群聊 给目标用户点赞直到当日上限
每日赞 / 天天赞我 群员 群聊 / 私聊 开启或续期每日赞
取消每日赞 / 每日赞取消 群员 群聊 / 私聊 关闭自己的每日赞
每日赞查看 / 查看每日赞 / 每日赞状态 / 每日赞查询 / 查询每日赞 群员 群聊 / 私聊 普通用户查看自己的每日赞状态,SUPERUSERS 可查看全部有效每日赞

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_sublike-0.1.7.tar.gz (10.2 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_sublike-0.1.7-py3-none-any.whl (13.6 kB view details)

Uploaded Python 3

File details

Details for the file nonebot_plugin_sublike-0.1.7.tar.gz.

File metadata

  • Download URL: nonebot_plugin_sublike-0.1.7.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for nonebot_plugin_sublike-0.1.7.tar.gz
Algorithm Hash digest
SHA256 d3a9cdfbfc7f0e88e3838f2063b744ff0f5df2236c98a892f13d324ed2139081
MD5 812ee21e3860d33d4a0b2ac548e2a74c
BLAKE2b-256 386032fc4ba5c975af125995546f2d860e9f89d81dcbb4d2404c4542ff256d1f

See more details on using hashes here.

File details

Details for the file nonebot_plugin_sublike-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: nonebot_plugin_sublike-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 13.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for nonebot_plugin_sublike-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 1fd68c556f8888cad414ecdd2c4879f41032195488a8eecb915d66139013e56e
MD5 c10832f53a217506992d7c7d17d12f8c
BLAKE2b-256 dd68d621d524736e64106eab35330be4e0d6ac847a382a76516c4f6a2c12fe23

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