aboutsummaryrefslogtreecommitdiff
path: root/discord/shard.py
Commit message (Collapse)AuthorAgeFilesLines
* Rename internal ConnectionState attribute to have an underscore.Rapptz2017-05-161-8/+8
| | | | | | Some people like to use that variable name apparently. See #568 and #569.
* Make sure that websockets.connect is a coroutine.Rapptz2017-05-091-2/+11
| | | | | | | | | | In 3.5.0 and 3.5.1 asyncio.ensure_future requires a Future or a coroutine otherwise a TypeError is raised. The issue is that the websockets.connect call is an awaitable rather than a coroutine. asyncio.ensure_future did not gain support for awaitables until 3.5.2. This patch allows 3.5.0 and 3.5.1 to connect regardless of their python version.
* Timeout when doing initial connection.Rapptz2017-04-221-9/+17
|
* Remove unused imports.Rapptz2017-04-181-1/+1
|
* Properly cleanup of VoiceClients in cache.Rapptz2017-04-181-0/+6
|
* Re-implement voice sending.Rapptz2017-04-181-0/+5
| | | | | | | | | | | | | | | | | | | | This is a complete redesign of the old voice code. A list of major changes is as follows: * The voice websocket will now automatically reconnect with exponential back-off just like the regular Client does. * Removal of the stream player concept. * Audio now gracefully pauses and resumes when a disconnect is found. * Introduce a discord.AudioSource concept to abstract streams * Flatten previous stream player functionality with the VoiceClient, e.g. player.stop() is now voice_client.stop() * With the above re-coupling this means you no longer have to store players anywhere. * The after function now requires a single parameter, the error, if any existed. This will typically be None. A lot of this design is experimental.
* Use create_future wrapper for initially created Future.Rapptz2017-04-121-1/+1
|
* Improve logging in more places.Rapptz2017-04-121-2/+1
| | | | | | This shows the Shard ID in more places, along with a gateway trace and session ID. Also helps show the RESUME/IDENTIFY/RESUMED/READY flow a bit more instead of it looking like the connection has zombied out.
* Proper recursion when launching shards.Rapptz2017-04-071-1/+1
|
* Aggregate shard closing futures instead of doing them sequentially.Rapptz2017-03-211-3/+2
|
* Check if we're closed before attempting to do a reconnect.Rapptz2017-03-211-1/+2
|
* Add experimental reconnection logic.Rapptz2017-02-151-21/+6
|
* Rewrite RESUME logic to be more in line with what is requested.Rapptz2017-02-081-4/+3
| | | | | | Apparently we should always try to RESUME first and if we get INVALIDATE_SESSION then we should IDENTIFY instead. This is the preferred way to do RESUMEs.
* Make all public is_ functions into methods instead of properties.Rapptz2017-01-291-3/+2
|
* Add option to disable auto member chunking.Rapptz2017-01-231-22/+36
|
* Update copyright year to 2017.Rapptz2017-01-201-1/+1
|
* Fix AutoShardedClient docstring.Rapptz2017-01-161-1/+1
|
* Remove extraneous prints.Rapptz2017-01-081-2/+0
|
* Allow overriding the shard_ids used for initial shard launch.Rapptz2017-01-081-2/+21
|
* Add AutoShardedClient.change_presence.Rapptz2017-01-081-0/+60
|
* Change the way shards are launched in AutoShardedClient.Rapptz2017-01-081-6/+58
|
* Implement AutoShardedClient for transparent sharding.Rapptz2017-01-071-0/+174
This allows people to run their >2,500 guild bot in a single process without the headaches of IPC/RPC or much difficulty.