yourWaifu / sleepy-discord

C++ library for the Discord chat client. Please use Rust for new bots
https://yourWaifu.github.io/sleepy-discord/
MIT License
707 stars 95 forks source link

Handling SIGINT? #197

Closed dreamscached closed 2 years ago

dreamscached commented 3 years ago

Hello!

I'm using this library for a while now, but I could never figure how do I handle interruption signals (and just run some sort of cleanup tasks.)

I tried using onQuit and onError as well as DiscordClient destructor, but none of these seemed to be running any code on SIGINT/SIGHUP/SIGTERM.

Is there a way to do this?