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.2.0.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

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

File details

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

File metadata

  • Download URL: nonebot_plugin_message_snapper-0.2.0.tar.gz
  • Upload date:
  • Size: 4.0 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.2.0.tar.gz
Algorithm Hash digest
SHA256 bd1deb43b373538ed02ddce36fccc8a74ded8c8857678e487f4e928e1dbc3c4a
MD5 18c49560c1c7257efd9afc32a98ba38f
BLAKE2b-256 2a5c687c5b1791df0d3f50cb79b87ccc2fd8679616da779ab5357f2bdf2f23cf

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nonebot_plugin_message_snapper-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 4.4 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e4dfc3a241b3cb4ed4d55f9042d81eaa878eeaccebed3be9315be920301220ad
MD5 e6ba0e177ef8d41857fce9a51b947e22
BLAKE2b-256 780510b46c17e949c1d1a5089d31c62e878ed0d6bd8996483b5a7b67fcf1abc2

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