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 = ["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


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.1.tar.gz (4.5 kB view hashes)

Uploaded Source

Built Distribution

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