📖 介绍
检查每个事件的产生时间,如果超过指定的过期时间,那么这个事件会被忽略。
可能的应用场景:
go-cqhttp 在未连接时会将所有事件积压,待连接建立后全部上报,而这些事件可能已经过时,你可以使用本插件来清理这些事件。
💿 安装
使用 nb-cli 安装
在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装nb plugin install nonebot-plugin-eventexpiry
使用包管理器安装
在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令pip
pip install nonebot-plugin-eventexpiry
pdm
pdm add nonebot-plugin-eventexpiry
poetry
poetry add nonebot-plugin-eventexpiry
conda
conda install nonebot-plugin-eventexpiry
打开 nonebot2 项目根目录下的 pyproject.toml 文件, 在 [tool.nonebot] 部分追加写入
plugins = ["nonebot_plugin_eventexpiry"]
⚙️ 配置
在 nonebot2 项目的.env文件中添加下表中的必填配置
| 配置项 | 必填 | 默认值 | 说明 |
|---|---|---|---|
| EVENTEXPIRY_EXPIRE | 否 | 30 | 指示插件应忽略多少秒前的事件,默认30秒 |
Metadata
Release files for nonebot-plugin-eventexpiry 0.1.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-eventexpiry-0.1.2.tar.gz | 2.9 kB | Without provenance | Details for nonebot-plugin-eventexpiry-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nonebot_plugin_eventexpiry-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for nonebot_plugin_eventexpiry-0.1.2-py3-none-any.whl |
Total release size: 6.6 kB
Release files / nonebot-plugin-eventexpiry-0.1.2.tar.gz
| Download URL | nonebot-plugin-eventexpiry-0.1.2.tar.gz |
|---|---|
| Size | 2.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7f6c6599346da4e74492f95a5217365b95a608aa9bdd3261414d40ae8ed87add
|
|
BLAKE2b-256 checksum How to use checksums |
faf082e1cbe2bec942d3c6885c7332038416b519603977fe8b377ee842d4cc15
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|
Release files / nonebot_plugin_eventexpiry-0.1.2-py3-none-any.whl
| Download URL | nonebot_plugin_eventexpiry-0.1.2-py3-none-any.whl |
|---|---|
| Size | 3.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
38d4ba32e6d1173fbdcca72f63937995331fbe825da91a9388f98372639cc73a
|
|
BLAKE2b-256 checksum How to use checksums |
c01ad0fc7f19ccc8ba1dd0ea0230aa0d44122c1ba0d64f78942b4b202ca0cd45
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|
Security for nonebot-plugin-eventexpiry 0.1.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.