Document Client.run reconnection idiosyncrasy.

This commit is contained in:
Rapptz 2015-11-26 23:59:16 -05:00
parent 4a25011ee1
commit e75edc2e57

View File

@ -573,7 +573,14 @@ class Client(object):
"""Runs the client and allows it to receive messages and events.
This function can raise a :exc:`GatewayNotFound` exception while attempting
to reconnect."""
to reconnect.
.. note::
This function attempts to reconnect if the websocket got closed
without explicitly calling :meth:`logout`. When this reconnect is
triggered, the :func:`discord.on_ready` event is called again.
"""
log.info('Client is being run')
self.ws.run()