Skip to main content

Reboot your bot by using command

Project description

Nonebot-plugin-reboot

用命令重启 bot

注意事项

不支持 nb-cli,即 nb run 启动方式。 需要在 bot 目录下使用 python bot.py 启动。

仅在 linux python3.8 fastapi 驱动器下测试过。 理论上与平台无关,但是我没测试(

安装

通过 pip 安装: pip install nonebot-plugin-reboot
并加载插件

使用

超级用户向机器人私聊发送命令 重启, rebootrestart
注意命令 COMMAND_START.

配置项

reboot_load_command: bool

  • 加载内置的 onebot v11 重启命令
  • 可以通过命令 重启 reboot restart 触发重启
  • 默认值: True

用程序触发重启

from nonebot_plugin_reboot import Reloader
Reloader.reload()

依赖

nonebot2 >= 2.0.0beta.2

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_reboot-0.1.1.tar.gz (3.5 kB view hashes)

Uploaded Source

Built Distribution

nonebot_plugin_reboot-0.1.1-py3-none-any.whl (4.2 kB view hashes)

Uploaded Python 3

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