基于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 = ["TeenStudy"]
配置
运行插件前,需要在 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
Close
Hashes for nonebot-plugin-BotMailNotice-0.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 158d5696a3d5f62fc8b35f443db77f1cf5111f80cc14e2ebd24f9483be3d15c1 |
|
MD5 | 9c7f279c503c204c398a01c18611ef98 |
|
BLAKE2b-256 | 3cfbe5bc93451703c4bdd8ae2f20ce942c40e6b4442edee8f236404931f71f02 |
Close
Hashes for nonebot_plugin_botmailnotice-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d086c66023cdc68f6937c2f2ffcf7ef848273c0a42f865dfacc2715794702bf8 |
|
MD5 | 38f743a40d3c13a965f5140d750296c4 |
|
BLAKE2b-256 | aaa22fdbe4e1cb97f5ef560a7e2f3ac16d629262231cd6ed29204407bb9cbb51 |