基于nonebot2bot断连时的Mail通知插件
Project description
介绍
- 可以在bot断开与nonebot2的连接时向指定邮箱发送邮件通知,用来通知是否掉线
安装及更新
第一种方式(不推荐)
- 使用
git clone https://github.com/ZM25XC/BotMailNotice.git指令克隆本仓库或下载压缩包文件
第二种方式(二选一)
- 使用
pip install nonebot-plugin-BotMailNotice来进行安装,使用pip install nonebot-plugin-BotMailNotice -U进行更新 - 使用
nb plugin install nonebot-plugin-BotMailNotice来进行安装,使用nb plugin install nonebot-plugin-BotMailNotice -U进行更新
导入插件
使用第一种方式安装看此方法
-
将
nonebot_plugin_BotMailNotice放在nb的plugins目录下,运行nb机器人即可 -
文件结构如下
📦 AweSome-Bot ├── 📂 awesome_bot │ └── 📂 plugins | └── 📂 nonebot_plugin_BotMailNotice | └── 📜 __init__.py ├── 📜 .env.prod ├── 📜 .gitignore ├── 📜 pyproject.toml └── 📜 README.md
使用第二种方式安装看此方法
- 在
pyproject.toml里的[tool.nonebot]中添加plugins = ["nonebot_plugin_BotMailNotice"]
配置
运行插件前,需要在 nonebot2 项目的.env.prod文件中添加下表中配置项
| 配置项 | 必填 | 值类型 | 默认值 | 说明 |
|---|---|---|---|---|
| username | 是 | str | "" | 邮箱账号 |
| password | 是 | str | "" | 邮箱密码或授权码 |
| hostname | 是 | str | "" | 邮箱服务器地址 |
| port | 是 | int | 465 | 邮箱端口号,ssl模式时为465 |
示例配置
mail_notice='{
"username":"xxx@qq.com",
"password":"qflgxxxxxx",
"hostname":"smtp.qq.com",
"port":587
}'
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nonebot-plugin-BotMailNotice-0.0.3.tar.gz.
File metadata
- Download URL: nonebot-plugin-BotMailNotice-0.0.3.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
25e4aacc00979d3399face8127f8a0b0fecfd17b06157fb2659dbc30f66d3dae
|
|
| MD5 |
f36754ade408685a97ff9743710a51e0
|
|
| BLAKE2b-256 |
348333546932f5dd474adfa2c60e7f567dbcd6c27eb7f69aa21ee7e375410118
|
File details
Details for the file nonebot_plugin_botmailnotice-0.0.3-py3-none-any.whl.
File metadata
- Download URL: nonebot_plugin_botmailnotice-0.0.3-py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2103ab211a2ea327734dd5c619b7e6217d8f16d362e9da85c708ede6c267cb9f
|
|
| MD5 |
226cffaf6d1fab3cf30a7ef74d2d6820
|
|
| BLAKE2b-256 |
5c70f648921e27407e0e7ba19781d7cace629308d9ec26e4e3d0d1b58ecd64fb
|