Skip to main content

基于nonebot2bot断连时的Mail通知插件

Project description

NoneBotPluginLogo

NoneBotPluginText

nonebot-plugin-BotMailNotice

✨ bot断连时的Mail通知插件 ✨

license pypi python

介绍

  • 可以在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


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-BotMailNotice-0.0.3.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file nonebot-plugin-BotMailNotice-0.0.3.tar.gz.

File metadata

File hashes

Hashes for nonebot-plugin-BotMailNotice-0.0.3.tar.gz
Algorithm Hash digest
SHA256 25e4aacc00979d3399face8127f8a0b0fecfd17b06157fb2659dbc30f66d3dae
MD5 f36754ade408685a97ff9743710a51e0
BLAKE2b-256 348333546932f5dd474adfa2c60e7f567dbcd6c27eb7f69aa21ee7e375410118

See more details on using hashes here.

File details

Details for the file nonebot_plugin_botmailnotice-0.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for nonebot_plugin_botmailnotice-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 2103ab211a2ea327734dd5c619b7e6217d8f16d362e9da85c708ede6c267cb9f
MD5 226cffaf6d1fab3cf30a7ef74d2d6820
BLAKE2b-256 5c70f648921e27407e0e7ba19781d7cace629308d9ec26e4e3d0d1b58ecd64fb

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page