Skip to main content

NoneBot2 event expiry filter

Project description

NoneBotPluginLogo

NoneBotPluginText

nonebot-plugin-eventexpiry

✨ 自动过滤过期事件 ✨

license pypi python

📖 介绍

检查每个事件的产生时间,如果超过指定的过期时间,那么这个事件会被忽略。

可能的应用场景:

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秒

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-eventexpiry-0.1.2.tar.gz (2.9 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_eventexpiry-0.1.2-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file nonebot-plugin-eventexpiry-0.1.2.tar.gz.

File metadata

File hashes

Hashes for nonebot-plugin-eventexpiry-0.1.2.tar.gz
Algorithm Hash digest
SHA256 7f6c6599346da4e74492f95a5217365b95a608aa9bdd3261414d40ae8ed87add
MD5 66ca001bd2812bef195f68f4a39b8122
BLAKE2b-256 faf082e1cbe2bec942d3c6885c7332038416b519603977fe8b377ee842d4cc15

See more details on using hashes here.

File details

Details for the file nonebot_plugin_eventexpiry-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for nonebot_plugin_eventexpiry-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 38d4ba32e6d1173fbdcca72f63937995331fbe825da91a9388f98372639cc73a
MD5 b102d8f19b0877a55bc078bf9d8e26bd
BLAKE2b-256 c01ad0fc7f19ccc8ba1dd0ea0230aa0d44122c1ba0d64f78942b4b202ca0cd45

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