Skip to main content

将引用的消息转换为图片发送

Project description

logo

✨ nonebot-plugin-message-snapper ✨

LICENSE pypi python uv
ruff pre-commit

📖 介绍

Message Snapper 是一个可用于自动生成 QQ 群聊中单条消息伪截图的 NoneBot 插件。

💿 安装

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

使用 pypi 源安装

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

使用清华源安装

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

安装仓库 master 分支

uv add git+https://github.com/Xwei1645/nonebot-plugin-message-snapper@master
pdm
pdm add nonebot-plugin-message-snapper

安装仓库 master 分支

pdm add git+https://github.com/Xwei1645/nonebot-plugin-message-snapper@master
poetry
poetry add nonebot-plugin-message-snapper

安装仓库 master 分支

poetry add git+https://github.com/Xwei1645/nonebot-plugin-message-snapper@master

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

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

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

nbr plugin install nonebot-plugin-message-snapper

使用 pypi 源安装

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

使用清华源安装

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

⚙️ 配置

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

配置项 必填 默认值 说明
message_snapper_template - 自定义模板文件
message_snapper_font_family - 用于渲染图片的字体家族
message_snapper_group_info_cache_hours 72.0 群信息缓存时长(小时)
message_snapper_member_info_cache_hours 72.0 群成员信息缓存时长(小时)

🎉 使用

指令表

指令 权限 需要@ 范围 说明
'snap' 并引用一条消息 群成员 群聊 生成被引用消息的伪截图

🎨 效果图

没有效果图

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_message_snapper-0.1.0.tar.gz (9.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_message_snapper-0.1.0-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file nonebot_plugin_message_snapper-0.1.0.tar.gz.

File metadata

  • Download URL: nonebot_plugin_message_snapper-0.1.0.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.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_message_snapper-0.1.0.tar.gz
Algorithm Hash digest
SHA256 fc0f05124fb14d20cf68ccc28d4e9864f35ba236b9850c03d7384b4662fd2554
MD5 ae21df348b0e25657edb54bee2873203
BLAKE2b-256 1747982439dd15b773d6b00d47899ca57a0ccf740a3026a355e4c0501c6f0a0f

See more details on using hashes here.

File details

Details for the file nonebot_plugin_message_snapper-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: nonebot_plugin_message_snapper-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.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_message_snapper-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f1e43df91c39d65c57ecbef1d8ed2497d369ae4682e6e4c811e4f96457ad5509
MD5 7bb44f47a540b1400f86e8b4c257d9a3
BLAKE2b-256 2a4941e9fc245d9ef62df62cffa6961a4ed586dbb3c2a3d0d533dcff717022df

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