Listen on 'online' event instead of on 'message' event

This change does the exact same this as the current code, only in a shorter and clearer way. Listening on the `online` event does the same thing as listening on the 'message' event and checking if the message is 'online'.