aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* | Fix some compilation feature targets, fix lintsZeyla Hellyer2017-10-175-8/+9
| |
* | Change `features` fields to be a Vec<String>Zeyla Hellyer2017-10-145-30/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When Discord adds new features, the Feature enum will not be able to serialize the new values until updated, causing the entire Guild deserialization to fail. Due to the fact that these features can be added at any time, the `features` vector on Guild and PartialGuild have been changed to be a `Vec<String>`. Upgrade path: Instead of matching on variants of Feature like so: ```rust use serenity::model::Feature; for feature in guild.features { if feature == Feature::VipRegions { // do work with this info } } ``` Instead opt to check the string name of the feature: ```rust for feature in guild.features { if feature == "VIP_REGIONS" { // do work with this info } } ```
* | Update to account for changes made in 0.4.1acdenisSK2017-10-1430-197/+606
|\|
| * Release v0.4.1v0.4.1Zeyla Hellyer2017-10-142-1/+96
| |
| * Update logoZeyla Hellyer2017-10-141-0/+0
| |
| * Feature-flag extern crates behind their nameZeyla Hellyer2017-10-141-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An issue with modifying what features enable compilation of what crates was possible due to crates being feature-flagged behind a module name instead of their own name. Instead of writing cfg features for crates as: ```rust \#[cfg(feature = "utils")] extern crate base64; ``` Write the feature name as its own name: ```rust \#[cfg(feature = "base64")] extern crate base64; ``` This way, crates can simply have compilation enabled in the project's features section in the `Cargo.toml` file.
| * Fix font-height in relation to the logo (#192)Lakelezz2017-10-131-0/+0
| | | | | | And soften the logo's upper pipe-opening.
| * Add related projects to READMEZeyla Hellyer2017-10-121-0/+17
| |
| * Add try_opt macro for substituteMei Boudreau2017-10-123-12/+13
| |
| * Optimize Member::rolesMei Boudreau2017-10-121-21/+11
| |
| * Help-features display `Aliases` and list information for `Aliases`. (#190)Lakelezz2017-10-121-60/+80
| |
| * Fix clippy lintsZeyla Hellyer2017-10-1122-101/+104
| |
| * Add env_logger bot exampleZeyla Hellyer2017-10-112-0/+57
| |
| * Make `has_correct_permissions`, `has_correct_roles` and ↵Lakelezz2017-10-102-3/+3
| | | | | | | | `has_all_requirements` public. (#188)
| * Add an iterator for `Args`acdenisSK2017-10-101-9/+33
| |
| * Add some docs to `Args`acdenisSK2017-10-101-0/+4
| |
| * Variety of methods to search for `Member`. (#187)Lakelezz2017-10-101-12/+218
| |
| * Reset shard heartbeat state on resumeZeyla Hellyer2017-10-091-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | When a resume is received, the heartbeat state would not be reset. This state includes: - whether the last heartbeat was acknowledged - when the last heartbeat was sent - when the last heartbeat acknowledgement was received This resulted in the bot re-IDENTIFYing after a Resumed event was received. To fix this issue, reset them when a Resumed event is received.
| * Make the client threadpool user-customizableZeyla Hellyer2017-10-094-15/+38
| | | | | | | | | | | | In addition to making the threadpool used by client shards customizable by the user, make only a single threadpool (as opposed to one per shard) and share it across all shards.
| * Add a threadpool to the shard runnerZeyla Hellyer2017-10-094-27/+61
| | | | | | | | | | | | A threadpool will help with giving event dispatches a threaded behaviour while still allowing the library the ability to perform other actions, such as receiving new events and heartbeating over the websocket client.
| * Generate `Default` for CurrentUser and use it in `Cache::default`acdenisSK2017-10-083-12/+3
| |
| * Add an impl for `&str`acdenisSK2017-10-081-0/+4
| |
| * Find `Member` via substrings, allow case-insensitivity on ↵Lakelezz2017-10-071-4/+54
| | | | | | | | `members_containing` and `members_starting_with` (#184)
| * Add the lifetime againacdenisSK2017-10-071-1/+1
| |
| * Help-commands filtering and Member-prefix-search (#182)Lakelezz2017-10-074-20/+41
| |
| * Make `has_correct_permissions` a free-standing functionacdenisSK2017-10-061-15/+15
| |
| * Fix a typoacdenisSK2017-10-051-1/+1
| |
| * Add an andacdenisSK2017-10-051-1/+1
| |
| * Use an as_ref hackacdenisSK2017-10-056-10/+17
| |
| * Replace slice parametres by IntoIterator (#177)François Triquet2017-10-057-9/+15
| | | | | | Fixes #174
| * Fix most clippy warningsMaiddog2017-10-049-33/+21
| |
| * Replace Vec parameters by IntoIterator (#176)François Triquet2017-10-0411-17/+17
| |
| * Force `I` to be not implemented outside serenityacdenisSK2017-10-031-3/+15
| |
| * Revert "Use the de-generification trick."acdenisSK2017-10-0319-349/+123
| | | | | | | | Makes the compiliation time just a bit worse
| * Use the de-generification trick.acdenisSK2017-10-0219-123/+349
| | | | | | | | Fixes #168
| * `to_owned` -> `to_string`acdenisSK2017-10-0140-201/+201
| |
| * Have `ConnectionStage` derive CopyacdenisSK2017-10-012-6/+6
| | | | | | | | Since it's a fairly simple enum. Also changed `is_connecting` to be more idiomatic.
| * Rename an internal Shard Runner methodZeyla Hellyer2017-09-301-2/+2
| | | | | | | | | | `ShardRunner::recv_events` actually only receives one event, so de-pluralize it.
| * Improve shard logicZeyla Hellyer2017-09-303-113/+168
| | | | | | | | | | | | | | | | | | | | Improve shard logic by more cleanly differentiating when resuming, as well as actually fixing resume logic. For shard runners, better handling of dead clients is added, as well as more use of the shard manager, in that the runner will now more liberally request a restart when required (instead of sitting and doing nothing infinitely).
| * Improve shard and shard runner loggingZeyla Hellyer2017-09-302-60/+99
| |
| * WhoopsacdenisSK2017-09-301-2/+2
| |
| * Add a todoacdenisSK2017-09-301-0/+1
| |
| * Make the internal string publicacdenisSK2017-09-301-1/+1
| |
* | Switch to parking_lot::{Mutex, RwLock}Zeyla Hellyer2017-10-1039-337/+422
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Switch to the `parking_lot` crate's implementations of `std::sync::Mutex` and `std::sync::RwLock`, which are more efficient. A writeup on why `parking_lot` is more efficient can be read here: <https://github.com/Amanieu/parking_lot> Upgrade path: Modify `mutex.lock().unwrap()` usage to `mutex.lock()` (not needing to unwrap or handle a result), and `rwlock.read().unwrap()`/`rwlock.write().unwrap()` usage to `rwlock.read()` and `rwlock.write()`. For example, modify: ```rust use serenity::CACHE; println!("{}", CACHE.read().unwrap().user.id); ``` to: ```rust use serenity::CACHE; println!("{}", CACHE.read().user.id); ```
* | Resume on resumable session invalidationsZeyla Hellyer2017-10-092-9/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Session invalidations include whether the session may be resumable. Previously, this was not parsed by serenity. This data is now contained in `GatewayEvent::InvalidateSession` as a boolean, which constitutes a breaking change for users that manually handle gateway events. Upgrade path: Instead of pattern matching on simply the variant like so: ```rust use serenity::model::event::GatewayEvent; match gateway_event { GatewayEvent::InvalidateSession => { // work here }, // other matching arms here _ => {}, } ``` Instead pattern match it as a single field tuple-struct: ```rust use serenity::model::event::GatewayEvent; match gateway_event { GatewayEvent::InvalidateSession(resumable) => { // work here }, // other matching arms here _ => {}, } ```
* | Make webhook_id a majour parameter in ratelimitingZeyla Hellyer2017-10-092-4/+19
| | | | | | | | | | This change is made due to this change in documentation: <https://github.com/discordapp/discord-api-docs/commit/32d06c360867cead6aa785ff10c437fdb2743bd6?short_path=5f625d6#diff-5f625d6c4303e22c3d6af4c8d6df28fe>
* | Reset shard heartbeat state on resumeZeyla Hellyer2017-10-091-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | When a resume is received, the heartbeat state would not be reset. This state includes: - whether the last heartbeat was acknowledged - when the last heartbeat was sent - when the last heartbeat acknowledgement was received This resulted in the bot re-IDENTIFYing after a Resumed event was received. To fix this issue, reset them when a Resumed event is received.
* | Make the client threadpool user-customizableZeyla Hellyer2017-10-094-15/+38
| | | | | | | | | | | | In addition to making the threadpool used by client shards customizable by the user, make only a single threadpool (as opposed to one per shard) and share it across all shards.
* | Add a threadpool to the shard runnerZeyla Hellyer2017-10-094-27/+61
| | | | | | | | | | | | A threadpool will help with giving event dispatches a threaded behaviour while still allowing the library the ability to perform other actions, such as receiving new events and heartbeating over the websocket client.
* | Generate `Default` for CurrentUser and use it in `Cache::default`acdenisSK2017-10-093-12/+3
| |