aboutsummaryrefslogtreecommitdiff
path: root/src/client
Commit message (Collapse)AuthorAgeFilesLines
* Change Cache::message test to ignore and move binding for new message in ↵Mishio5952018-08-232-19/+14
| | | | message_update dispatch
* Resolve conflictsMishio5952018-08-117-36/+46
|\
| * Fix all the dead links in the docsErk-2018-08-096-26/+25
| |
| * Fix erroneous deadlock detected messages. (#363)Lymia Aluysia2018-08-081-10/+10
| |
| * Fix compilation + tests on certain feature combosZeyla Hellyer2018-08-072-0/+11
| | | | | | | | | | | | | | | | On certain feature combinations, compilation and tests would not function correctly. This commit goes through a number of feature combinations and gates some tests behind the required features and fixes other compilation errors.
* | Merge branch 'upstream'Mishio5952018-08-061-1/+12
|\|
| * Fix potential dispatch cache deadlocking + log itZeyla Hellyer2018-08-021-1/+12
| | | | | | | | | | | | Fix the dispatch functionality potentially deadlocking when a deadlock has occurred elsewhere (or a read/write lock is forever held elsewhere), and log when it happens, WARNing the user that a possible deadlock has happened.
* | Merge branch 'upstream'Mishio5952018-08-021-1/+1
|\|
| * Add missing `mut`acdenisSK2018-08-021-1/+1
| |
* | Merge branch 'upstream'Mishio5952018-08-013-61/+33
|\|
| * Don't delay Ready with cache enabledZeyla Hellyer2018-08-011-46/+5
| | | | | | | | | | | | | | | | | | | | | | When the cache is enabled, don't delay the Ready until all guilds have been received. This never really worked in the first place and duplicates the "cached" logic that fires when all guilds have been received. This presumably fixes the "silent death" bug, as this appears to stall the thread on certain conditions.
| * De-cringe a commentacdenisSK2018-08-011-3/+3
| |
| * Add From impls for Game, generify Game paramsZeyla Hellyer2018-08-012-12/+24
| | | | | | | | | | Add more `impl From<T> for Game` implementations, and make `Into<Game>` trait bounds for all function parameters accepting a Game.
| * Deprecate Context::edit_profileZeyla Hellyer2018-07-311-0/+1
| | | | | | | | This method won't exist in v0.6.x.
* | EventHandler::message_update with cache feature sends old message if availableMishio5952018-07-242-2/+21
|/
* Fix some clippy lintsZeyla Hellyer2018-07-152-4/+4
| | | | | Some lints were not resolved due to causing API changes. Most lints in the framework were left unfixed.
* Fix doc links with no anchorZeyla Hellyer2018-07-112-3/+4
|
* Add a message cache API (#345)zeyla2018-07-091-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds an API for message caching. By default this caches 0 messages per channel. This can be customized when instantiating: ```rust use serenity::cache::{Cache, Settings}; let mut settings = Settings::new(); // Cache 10 messages per channel. settings.max_messages(10); let cache = Cache::new_with_settings(settings); ``` After instantiation: ```rust use serenity::cache::Cache; let mut cache = Cache::new(); cache.settings_mut().max_messages(10); ``` And during runtime through the global cache: ```rust use serenity::CACHE; CACHE.write().settings_mut().max_messages(10); ```
* Remove extraneous spaces at the end of linesZeyla Hellyer2018-06-174-59/+59
|
* Fix links to the repoZeyla Hellyer2018-05-231-1/+1
| | | | | Fixes links to the repo from `https://github.com/zeyla/serenity` to `https://github.com/serenity-rs/serenity`.
* Replace (most) placeholders with actual namesacdenisSK2018-05-221-54/+54
|
* Remove a usage of Clone::cloneZeyla Hellyer2018-04-261-2/+2
|
* Fix panics on guild member update dispatchesZeyla Hellyer2018-04-261-10/+12
| | | | | | | | Fixes panics for Guild Member Update dispatches, a retrieval for the new version of the member sooner and checking that the member exists prior to dispatching. Closes #264.
* Remove empty whitespace at ends of linesZeyla Hellyer2018-04-251-3/+3
|
* Refactor imports/exports to use nested groups and better formattingacdenisSK2018-03-2911-35/+81
|
* Fix heartbeat checkingZeyla Hellyer2018-03-271-7/+2
| | | | | If a heartbeat acknowledgement is not received, then the shard should restart.
* Remove useless clones (#292)Maiddog2018-03-171-1/+1
|
* Fix no-cache standardframework compilation (#290)Lakelezz2018-03-151-1/+1
|
* Add documentation to `EventHandler`acdenisSK2018-02-191-2/+205
|
* Fix broken docs links caused by model mod changesZeyla Hellyer2018-01-314-20/+20
| | | | | Fix broken links caused by the `model` module changes in v0.5.0, which split up the module into sub-modules for better organization.
* Expose a client voice managerZeyla Hellyer2018-01-187-78/+268
|
* Use an InterMessage to communicate over gatewayZeyla Hellyer2018-01-187-24/+32
| | | | | | | Instead of communicating over the gateway in a split form of a `serde_json::Value` or a `client::bridge::gateway::ShardClientMessage`, wrap them both into a single enum for better interaction between the client, gateway, and voice modules.
* Fix ShardManager doctestZeyla Hellyer2018-01-101-11/+14
|
* Revert "Add `Client::user_id`"Zeyla Hellyer2018-01-101-9/+3
| | | | | | | | | | | This reverts commit 062ea86d5b0d9932207636d4a44a5357b079e79a. This change had the unintended side-effect of making tests with the Client impossible without hitting Discord's REST API for every test (even worse, while unauthorized). Knowing the user's ID on creation isn't _too_ important, and what was being done with that knowledge can be deferred to connection start.
* Simplify ShardManager creationZeyla Hellyer2018-01-103-119/+54
| | | | | | Instead of creating different `new` functions for every bridged feature combination, accept a struct of options. Structs can have conditional fields, unlike functions which can not have conditional arguments.
* Add `Client::user_id`Zeyla Hellyer2018-01-101-3/+10
| | | | | Add the user ID to the client. This can be used when initializing the framework on connection start, as well as the future voice manager.
* Remove `is_bot` boolean from frameworkZeyla Hellyer2018-01-101-1/+1
| | | | | The framework no longer needs the `is_bot` boolean state, since serenity now only supports bot users.
* Move `VecMap` to `utils`acdenisSK2018-01-021-3/+3
| | | | This also fixes no-builder compilation
* Resolve no-framework client compilationZeyla Hellyer2018-01-021-2/+2
|
* Update dispatch.rsZeyla Hellyer2018-01-021-1/+1
|
* Fix no-framework dispatchingZeyla Hellyer2018-01-021-1/+1
|
* Add an event for shard updatesZeyla Hellyer2018-01-016-47/+106
| | | | | Add an event in the EventHandler to be called when a shard updates its Connection Stage.
* Expose a method of retrieving shard status/latencyZeyla Hellyer2018-01-014-1/+52
| | | | | | This exposes a method of retrieving a shard's status and latency through the Shard Manager, as part of the existing Shard Runner Info struct. The Shard Runner will update this whenever it notices a change.
* Improve performance of builders even furtheracdenisSK2017-12-271-3/+3
| | | | | | By negating hashing altogether. The increase is around 1000-ish nanoseconds saved.
* Add missing trailing comma in matchZeyla Hellyer2017-12-171-1/+1
|
* Trim given token in Client::newZeyla Hellyer2017-12-171-0/+2
| | | | | Trims the token given as an argument in Client::new, which will strip away whitespace that might occur due to including the token from a file.
* Fix doc-tests and `single_zc`acdenisSK2017-12-171-5/+5
|
* Fix shards attempting to re-identify on their ownZeyla Hellyer2017-12-161-8/+24
| | | | | | | | | | Fix shards by taking away their responsibility to re-identify, instead shutting down shard runners and going through the shard queuer to restart a shard runner and its associated shard. This fixes the case where a running shard's session invalidates and re-IDENTIFYs within 5 seconds before queued shard starts, causing a cascading failure of sessions for new shards.
* Fix most clippy lints, take more refeerncesZeyla Hellyer2017-12-164-62/+63
| | | | | Fix clippy lints and subsequently accept references for more function parameters.
* Attempt to restart failed shard bootsZeyla Hellyer2017-12-162-18/+48
| | | | | | | | | | | | When the ShardQueuer fails to restart a shard (such as due to a network error, an issue on Discord's side, Cloudflare, etc.), it will now push the ID onto a queue. Every 5 seconds messages will attempt to be read from the receiver, and if one is not read after the timeout, a queued shard start will occur (if one is queued). This should fix a number of reconnection issues.