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","赞他"] 即时点赞他人的触发词
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.4.tar.gz (10.0 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.4-py3-none-any.whl (13.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nonebot_plugin_sublike-0.1.4.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.4 {"installer":{"name":"uv","version":"0.11.4","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.4.tar.gz
Algorithm Hash digest
SHA256 984d8e2a7a6fac21a278b5a10ba2986dec62fa2c79a27d4ca8d0fdd80fb773c9
MD5 d3704b902a1bac59f6ffa4c6a2422f58
BLAKE2b-256 5d9ca41c222c1ffd3c1437c121357b169443f5bca95e002ccd1aeeaac1259044

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nonebot_plugin_sublike-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 13.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.4 {"installer":{"name":"uv","version":"0.11.4","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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 0970a549c72433b1a39aabe120735fb0df34f277802618514bd896c64c5df2d4
MD5 b269bef5d734ed057d5910f069933547
BLAKE2b-256 d2604f584b7e005cc21709ab19d1c8e53f018de3ea2e93dbbb368ce1c00fd9d5

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