LeSysBot docs

Package version

not declared

Platforms

All platforms

Requires on PATH

nothing

Python dependencies

none

Install#

Nothing to do — this package ships inside LeSysBot and is available as soon as the installer finishes.

Tools#

This package exposes 3 tools.

reboot()#

asks to confirm

Restart the machine one minute from now.

Parameters

Takes no parameters.

Confirmation prompt

⚠️ This will REBOOT the machine in 1 minute. Proceed?

power_off()#

asks to confirm

Shut the machine down one minute from now.

Parameters

Takes no parameters.

Confirmation prompt

⚠️ This will POWER OFF the machine in 1 minute. Proceed?

cancel_shutdown()#

asks to confirm

Cancel a pending reboot or shutdown before the timer expires.

Parameters

Takes no parameters.

Confirmation prompt

Cancel the pending shutdown/reboot?

Notes#

  • The one-minute delay is deliberate: it gives the chat reply time to reach you before the machine goes down, and it leaves a window to run cancel_shutdown if you change your mind.
  • The right command is selected per OS. On systemd Linux the shutdown is scheduled through logind and polkit, so it runs as your normal user — no sudo, no setup.
  • About ten seconds before the machine actually goes down, LeSysBot pushes a separate heads-up message, so you know the cancellation window has closed.

Source#

Every package is a folder holding a README.md and a tool.py. Read this one on GitHub: lesysbot/lesysbot/tools/power.

To write your own, see Writing tools.