scrapinghub / slackbot

A chat bot for Slack (https://slack.com).
MIT License
1.26k stars 394 forks source link

Quit slackbot from within a plugin #131

Closed Omertron closed 7 years ago

Omertron commented 7 years ago

I'd like to have an auto update routine for my plugin bot.

I have written a wrapper script around the "run.py" script to allow the autoupdate to pull from github when the bot exits before restarting the bot again.

However, I can't find a way to initiate a shutdown from within the bot.

Is there a way to do this?

jlowin commented 7 years ago

You can use os._exit() to force the process to quit without raising an error