aboutsummaryrefslogtreecommitdiff
path: root/src/client
Commit message (Collapse)AuthorAgeFilesLines
* Split event handling in the cache to a traitacdenisSK2017-08-101-18/+4
| | | | note: This trait might become like `framework::Framework` in the future.
* Clippy and rustfmtacdenisSK2017-08-011-6/+6
|
* Remove a few clonesacdenisSK2017-07-291-5/+6
|
* Change the config a bit, and a few nitpicksacdenisSK2017-07-272-25/+35
|
* rustfmtacdenisSK2017-07-275-161/+156
|
* Use a consistent indentation styleZeyla Hellyer2017-07-261-18/+18
| | | | | | | | | This project has - in the past - used an indentation style of 4 spaces, without trailing whitespace. This commit modifies lines with tab indentation to 4 spaces. Whether to use tabs or spaces is up to the current maintainer, but consistency avoids files eventually being completely mixed styles.
* Make the `framework` module feature-gated and fix the names in the helper macroacdenisSK2017-07-272-6/+6
|
* Fix condional compilation for `Framework::initialized` when ↵acdenisSK2017-07-271-18/+22
| | | | builtin-framework is turned off
* PhantomData begoneacdenisSK2017-07-231-1/+0
|
* Fix #130acdenisSK2017-07-222-91/+102
| | | | Removed action support from the builtin one as well, due to it adding some uneccassery complexity and it being only asked upon by one user
* Fix event handler dispatchingacdenisSK2017-07-171-7/+11
|
* Make CloseHandle derive Copy (#127)Jorge Israel Peña2017-07-161-1/+1
|
* Handle the closing of Shards (#126)Jorge Israel Peña2017-07-161-3/+16
|
* Possibly fix the closing of shardsacdenisSK2017-07-161-2/+1
|
* Add a close handle for closing the shards in another threadacdenisSK2017-07-161-4/+13
|
* Actually, revert the publicity and add `#[derive(Clone)]`acdenisSK2017-07-161-1/+2
|
* Make `HANDLE_STILL` publicacdenisSK2017-07-161-1/+1
|
* Remove more threads with futuresacdenisSK2017-07-152-29/+28
|
* Add a way to close all shards explictlyacdenisSK2017-07-141-22/+36
|
* Switch to tokio for events (#122)Alex Lyon2017-07-143-103/+268
|
* Remove the deprecated functionsacdenisSK2017-07-111-18/+0
| | | | It's already been enough time for people to migrate
* Fixed clippy warnings (#120)Kaidan2017-07-101-1/+1
|
* Apply the new api change for dms in botsacdenisSK2017-07-072-7/+23
|
* Add an `is_new` to the arguments of the `guild_create` handleracdenisSK2017-07-052-2/+15
| | | | To make a better distinction from a guild that the bot's already in and from the ones it's joining
* Add a macro hereacdenisSK2017-07-031-48/+32
|
* Fix doc testsacdenisSK2017-07-022-93/+175
|
* Add a `quit` function`acdenisSK2017-06-301-0/+11
| | | | Fixes #70
* Whoops, and add a fail-safe to an upcomming pr to the compileracdenisSK2017-06-283-145/+50
| | | | https://github.com/rust-lang/rust/pull/42894
* Update readme, docs and add `EventHandler` to the preludeacdenisSK2017-06-281-19/+31
|
* Merge branch "trait-based-event-handling"acdenisSK2017-06-283-937/+322
|
* Add reaction actions (#115)alex2017-06-281-16/+87
| | | Fixes #87
* Add an `on_cached` event (#114)alex2017-06-283-8/+76
| | | | Fixes #89
* Docs fixesmei2017-06-271-2/+1
|
* Fix no-framework, client compilesZeyla Hellyer2017-06-241-1/+1
|
* Attempt to reconnect if heartbeating failsZeyla Hellyer2017-06-211-1/+1
|
* Reconnect on failed heartbeatsZeyla Hellyer2017-06-211-1/+5
|
* Rework shard logic and shard handlingZeyla Hellyer2017-06-161-127/+49
|
* Reset shard handling on reconnectsZeyla Hellyer2017-06-141-0/+6
| | | | | | After the shard handler successfully reconnects a shard, reset the `last_ack_time` and `last_heartbeat_sent` to avoid going into an endless reconnection loop.
* Fix no-framework compilationZeyla Hellyer2017-06-141-1/+1
|
* Switch from #[doc(hidden)] to pub(crate)alex2017-06-141-8/+1
| | | | | | Switch from using `#[doc(hidden)]` to hide some internal functions to `pub(crate)`. The library now requires rustc 1.18.
* Remove Context::{channel_id, queue}Zeyla Hellyer2017-06-132-70/+42
| | | | | | | | | The `channel_id` field on Context is no longer required internally, and is no longer of use to userland as event handlers are given the channel ID in some way where possible. `queue` is a remnant from when the Context was the primary way to interact with the REST API.
* Fix voice compilationZeyla Hellyer2017-06-101-33/+49
|
* Upgrade rust-websocket, rust-openssl, and hyperZeyla Hellyer2017-06-072-44/+69
| | | | | | | | | | | | | | | | Upgrade `rust-websocket` to v0.20, maintaining use of its sync client. This indirectly switches from `rust-openssl` v0.7 - which required openssl-1.0 on all platforms - to `native-tls`, which allows for use of schannel on Windows, Secure Transport on OSX, and openssl-1.1 on other platforms. Additionally, since hyper is no longer even a dependency of rust-websocket, we can safely and easily upgrade to `hyper` v0.10 and `multipart` v0.12. This commit is fairly experimental as it has not been tested on a long-running bot.
* Make client starts return an errorZeyla Hellyer2017-06-062-2/+39
| | | | | | When returning, the Client would return an Ok(()). Instead, return an error, since there is currently no reason the client would return under "okay" circumstances.
* Make client join shards and returnZeyla Hellyer2017-06-061-4/+8
| | | | | | | | | | Instead of running a loop forever, have the client join threads when they end. This is currently a poor way of having the client eventually end, but for now it's a duck-tape solution, as when one shard completely fails to reboot it's an indicator of a larger issue (invalidated authentication, intermittent network issues, etc.)
* Deprecate Client::login, add Client::newZeyla Hellyer2017-06-062-44/+53
|
* Fix compilations across feature combinationsZeyla Hellyer2017-06-022-3/+6
|
* Fix client-feature, no-model compilesZeyla Hellyer2017-06-011-3/+21
| | | | | | | Some of the methods used in the client dispatch, namely `Channel::id` and `Message::transform_content`, are not _required_ for functionality by the dispatcher. Since these methods are `model` features, they can be gated behind a `model` feature cfg.
* Add more examples and improve some othersZeyla Hellyer2017-05-232-26/+453
| | | | | Add examples to some functions, and update some of the old examples to use the `?` operator instead of unwrapping.
* Restructure modulesZeyla Hellyer2017-05-2211-3190/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Modules are now separated into a fashion where the library can be used for most use cases, without needing to compile the rest. The core of serenity, with no features enabled, contains only the struct (model) definitions, constants, and prelude. Models do not have most functions compiled in, as that is separated into the `model` feature. The `client` module has been split into 3 modules: `client`, `gateway`, and `http`. `http` contains functions to interact with the REST API. `gateway` contains the Shard to interact with the gateway, requiring `http` for retrieving the gateway URL. `client` requires both of the other features and acts as an abstracted interface over both the gateway and REST APIs, handling the event loop. The `builder` module has been separated from `utils`, and can now be optionally compiled in. It and the `http` feature are required by the `model` feature due to a large number of methods requiring access to them. `utils` now contains a number of utilities, such as the Colour struct, the `MessageBuilder`, and mention parsing functions. Each of the original `ext` modules are still featured, with `cache` not requiring any feature to be enabled, `framework` requiring the `client`, `model`, and `utils`, and `voice` requiring `gateway`. In total the features and their requirements are: - `builder`: none - `cache`: none - `client`: `gateway`, `http` - `framework`: `client`, `model`, `utils` - `gateway`: `http` - `http`: none - `model`: `builder`, `http` - `utils`: none - `voice`: `gateway` The default features are `builder`, `cache`, `client`, `framework`, `gateway`, `model`, `http`, and `utils`. To help with forwards compatibility, modules have been re-exported from their original locations.