安装
使用nb-cli [推荐]
nb plugin install nonebot-plugin-tg-stickers-downloads
使用pip
pip install nonebot-plugin-tg-stickers-downloads
使用
命令用法:
/tgsd https://t.me/addstickers/<StickerPackName>
示例:
/tgsd https://t.me/addstickers/TgStickerPackDemo
外部依赖安装(macOS / Linux)
说明:
.webm -> .gif需要ffmpeg(可选gifsicle优化体积).webp -> .png默认使用 Pillow;配置tgsd_imagemagick_path时优先使用 ImageMagick
macOS(Homebrew):
brew install ffmpeg gifsicle imagemagick
Linux(Debian/Ubuntu):
sudo apt update
sudo apt install -y ffmpeg gifsicle imagemagick
Linux(Fedora):
sudo dnf install -y ffmpeg gifsicle ImageMagick
如果你的可执行文件不在系统 PATH 中,请在配置里显式填写:
tgsd_ffmpeg_pathtgsd_gifsicle_pathtgsd_imagemagick_path
外部依赖安装 (Windows)
配置项
配置方式:直接在 NoneBot 全局配置文件中添加以下配置项即可
tgsd_bot_token [必填]
- 类型:
str - 默认值:
None - 说明:用于获取贴纸包信息与文件下载地址的 Telegram Bot Token
tgsd_proxy [选填]
- 类型:
str - 默认值:
None - 说明: 配置用于访问 Telegram Bot Api 的代理 例如
tgsd_proxy="http://127.0.0.1:6152"
tgsd_ffmpeg_path [选填]
- 类型:
str - 默认值:
None - 说明:
ffmpeg可执行文件的绝对路径. 用于.webm -> .gif转换; 不填写时将自动从系统PATH中查找ffmpeg
tgsd_gifsicle_path [选填]
- 类型:
str - 默认值:
None - 说明:
gifsicle可执行文件的绝对路径. 用于对生成的 GIF 进行进一步压缩优化; 不填写时将自动从系统PATH中查找, 找不到则跳过优化
tgsd_imagemagick_path [选填]
- 类型:
str - 默认值:
None - 说明:ImageMagick 可执行文件路径(
magick或convert)仅在配置该项时优先使用 ImageMagick 进行.webp -> .png转换; 未配置时默认使用 Pillow
tgsd_cache_expire_seconds [选填]
- 类型:
int - 默认值:
86400(24 小时) - 说明:贴纸包缓存过期时间(秒)过期后缓存将在定时清理时被删除
tgsd_download_concurrency [选填]
- 类型:
int - 默认值:
5 - 说明:同时下载贴纸的最大并发数
tgsd_convert_concurrency [选填]
- 类型:
int - 默认值:
2 - 说明:同时进行格式转换的最大并发数
tgsd_skip_conversion [选填]
- 类型:
bool - 默认值:
False - 说明:设为
True时跳过所有格式转换, 仅保留原始文件(.webp、.webm、.tgs)
tgsd_subprocess_timeout [选填]
- 类型:
int - 默认值:
120 - 说明:外部转换工具(ffmpeg、gifsicle、ImageMagick)的子进程超时时间(秒)超时后进程将被终止
Metadata
Release files for nonebot-plugin-tg-stickers-downloads 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nonebot_plugin_tg_stickers_downloads-0.2.2.tar.gz | 15.2 kB | Without provenance | Details for nonebot_plugin_tg_stickers_downloads-0.2.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nonebot_plugin_tg_stickers_downloads-0.2.2-py3-none-any.whl | Python 3 | none | any | Details for nonebot_plugin_tg_stickers_downloads-0.2.2-py3-none-any.whl |
Total release size: 28.4 kB
Release files / nonebot_plugin_tg_stickers_downloads-0.2.2.tar.gz
| Download URL | nonebot_plugin_tg_stickers_downloads-0.2.2.tar.gz |
|---|---|
| Size | 15.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fd26d76fe2b3ac5fced13c76127219edc9ad4efd84282b4292ae910cc6ba8e98
|
|
BLAKE2b-256 checksum How to use checksums |
afae308a0092015a51feb6a8ff6775fc3eaadc91c1dcc923cea6e7b5f0d42489
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","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}
|
Release files / nonebot_plugin_tg_stickers_downloads-0.2.2-py3-none-any.whl
| Download URL | nonebot_plugin_tg_stickers_downloads-0.2.2-py3-none-any.whl |
|---|---|
| Size | 13.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a665b34a8dd3883074761026166d136ed856e24883e762ec2e3e90ff65742654
|
|
BLAKE2b-256 checksum How to use checksums |
098a334d861829d5f341b00e36f9184b364649d3e8bc2d8241183ebd69cd77df
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","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}
|
Security for nonebot-plugin-tg-stickers-downloads 0.2.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.